Customize android

I have a toolbar that currently looks like

<ToolbarAndroid title='WWF' style={styles.toolbar} navIcon={require("./App/assets/logo.png")} logo={require("./App/assets/logo.png")} actions={[{title: 'list', show: 'always'}, {title: 'partners', show: 'always'}, {title: 'about', show: 'always'}]} onActionSelected={this.onActionSelected} /> 

Can I change the size and position of the logo? It is currently sitting with the edge on the left, and I would like to make it sit in the left corner of the screen and make it wider.

Is it also possible to have two images next to each other as a logo?

thanks

+5
source share
2 answers

I do not think that <ToolbarAndroid /> can be customized. You should probably make your own component with <View /> according to your needs or take a look at the react-native-navbar library .

+1
source

try this code to implement a toolbar

 ender () { const { title, onLeftPress, showDrawer } = this.props return ( <Icon.ToolbarAndroid navIconName={showDrawer ? 'md-menu' : 'md-arrow-back'} onIconClicked={onLeftPress} style={styles.toolbar} titleColor={'white'} title={title} /> ) } const styles = StyleSheet.create({ toolbar: { backgroundColor: 'blusteel', height: 54, position: 'absolute', top: 0, left: 0, width: Dimensions.get('window').width } }) 
0
source

Source: https://habr.com/ru/post/1241396/


All Articles