[V3] Android topBar rightButtons component not centered
Issue Description
I have a rightButton component in my topbar. On iOS it's works and looks as expected. The issue is on android, that it is not centering
iOS

Android

Some snippets of code: The bottomTab Option to create the rightButton in the topBar
topBar: {
title: {
text: tab.title,
},
rightButtons: rightButtonAvatar(tab.name),
},
const rightButtonAvatar = tabId => [
{
id: CONSTANTS.AVATAR_COMPONENT,
component: {
name: CONSTANTS.AVATAR_COMPONENT,
passProps: {
tabId,
},
},
},
];
And the actual component
const styles = StyleSheet.create({
wrapper: {
alignItems: 'flex-end',
zIndex: 999,
position: 'relative',
},
avatarContainer: {
width: 35,
height: 35,
borderRadius: 100,
flex: 1,
alignItems: 'center',
justifyContent: 'center',
borderWidth: 1,
position: 'relative',
},
avatarContainerOk: {
backgroundColor: S.COLOR.OK,
},
networkStatus: {
width: 25,
height: 25,
borderRadius: 100,
position: 'absolute',
right: -10,
bottom: -5,
justifyContent: 'center',
alignContent: 'center',
flex: 1,
},
initials: {
fontWeight: '600',
},
statusIcon: {
height: 15,
width: undefined,
},
});
export const Avatar: React.FC<IAvatarProps> = props => {
return (
<View style={styles.wrapper}>
<TouchableOpacity
style={[styles.avatarContainer]}
>
<Text style={styles.initials}>
NM
</Text>
<View
style={[
styles.networkStatus,
styles.avatarContainerOk
]}
>
<Image
source={ICONS_MAP.PAUSE}
style={styles.statusIcon}
resizeMode="contain"
/>
</View>
</TouchableOpacity>
</View>
);
};
Environment
- React Native Navigation version: 3.2.0
- React Native version: 0.60.5
- Platform(s) (iOS, Android, or both?): Only Android
- Device info (Simulator/Device? OS version? Debug/Release?): Simulator Android Pixel C tablet
Update: When pressing the avatar in the top right hand side, I display an overlay. When pressing on the few pixels of the avatar I have on android, the overlay shows. When I close the overlay, the avatar is shown fully in the top right hand side corner (still not centered though, but you can see it fully)
Is someone able to reproduce this? Still having this issue...
Same here, but only when I use mergeOptions, if I update the color of rightButton, it's going upside and can't push any component. I tried lot of workaround, but no one works
I am not using any mergeOptions. @guyca is back, so hopefully he knows what's going on.
Bump - still not stale.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.
Not stale.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.
Still not stale.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.
This is still an issue...
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest version and report back. Thank you for your contributions.
The issue has been closed for inactivity.