react-native-material-ui
react-native-material-ui copied to clipboard
Toolbar rightElement is shown on the left
I'm trying to put a profile image on the right side of the toolbar. I use this code
<Toolbar rightElement={ <Avatar text="E" /> } />
but the Avatar
element appear in the left side.
I can replicate this. I thought that if you don't have a centerElement
on the Toolbar
was causing this but it happens regardless.
@ercpereda depends on the flexGrow in the Avatar style
duplicate -> https://github.com/xotahal/react-native-material-ui/issues/264
With the change we can use
rightElement={ <Avatar text="E" style={{ main: { flexGrow: 0 }}} /> }
to override the default, that i don't want to change.
Interesting. Would it help if you wrap the Avatar with extra View? Have to check what happens in there ..
HI, any alternative solution for this. I have used this package for my project and it is not working for ios.
Not working in ios
rightElement={{ menu: { icon: "more-vert", labels: ["Change Password", "Logout"] } }}
Not working for both ios and android.
rightElement='more-vert'