Nativebase: Left Is not working in Header for Android

Created on 2 Aug 2018  路  3Comments  路  Source: GeekyAnts/NativeBase

Hello,

This is my code for displaying menu button for navigation drawer.

const MenuButton = props =>{
    return (
        <View>
          <Header>
            <Left>
                <Button transparent >
                    <Icon name='menu' onPress = {props.onPress}/>
                </Button>

            </Left>
          </Header>
        </View>
      );
}

On ios, its working fine but on Android, button is moved near to mid as in the screenshot. I have attached screenshot as well. Please help me.

screenshot_1533204328

Most helpful comment

also that, if you include <Left> component, then you should include the other counterparts to place the Left component appropriately

<Header>
  <Left>
    <Button transparent >
      <Icon name='menu'/>
    </Button>
  </Left>
  <Body />
  <Right />
</Header>

All 3 comments

@grhashminxb Closing this issue since it does not follow issue template guidelines

also that, if you include <Left> component, then you should include the other counterparts to place the Left component appropriately

<Header>
  <Left>
    <Button transparent >
      <Icon name='menu'/>
    </Button>
  </Left>
  <Body />
  <Right />
</Header>

@SupriyaKalghatgi I am sorry I didn't know about template but your suggestion has resolved this issue.
Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

inv2004 picture inv2004  路  3Comments

omerdn1 picture omerdn1  路  3Comments

Bundas picture Bundas  路  3Comments

bsiddiqui picture bsiddiqui  路  3Comments

eggybot picture eggybot  路  3Comments