Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to handle headerLeft navigation option on Android? #1443

Closed
joncursi opened this issue May 10, 2017 · 3 comments
Closed

How to handle headerLeft navigation option on Android? #1443

joncursi opened this issue May 10, 2017 · 3 comments
Labels

Comments

@joncursi
Copy link

headerLeft renders nicely on iOS since the title text is centered. There is room for it to render. However, on android, the title renders more on the left side to begin with, so sticking a custom element on headerLeft will cause conflicts. Consider the following example:

screen shot 2017-05-10 at 8 50 59 am

Thoughts on a clean way to handle this?

@AlanFoster
Copy link

@joncursi You can confirm this within the source code, but i believe the default back button may have paddingRight added to it to solve this issue

@alenia
Copy link

alenia commented May 11, 2017

Maybe try to modify headerTitleStyle?

@RogerParis
Copy link

RogerParis commented May 16, 2017

static navigationOptions = {
    header: (navigation) => ({
      title: <Text style={{ 
            color: 'rgba(0, 0, 0, .9)', 
            fontWeight: Platform.OS === 'ios' ? '600' : '500',  
            fontSize: Platform.OS === 'ios' ? 17 : 18, 
            alignSelf: 'center' 
         }}>Filters</Text>,
      right: <SearchButton />,
      left: <CancelButton />,
    })
  };

This looks good in my case. I hope it helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants