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

Header title overlap back arrow #4754

Closed
rutvikwebmobtech opened this issue Jul 24, 2018 · 7 comments
Closed

Header title overlap back arrow #4754

rutvikwebmobtech opened this issue Jul 24, 2018 · 7 comments

Comments

@rutvikwebmobtech
Copy link

My code

 const AppRoute = createStackNavigator({

        Login: {
            screen: Login,
            navigationOptions: {
                title: 'Login'
            },
        },
        Home: {
            screen: Home,
            navigationOptions: {
                title: 'Home',
                headerStyle:{
                    backgroundColor:'yellow'
                }
           },
        }
    },
    {
        initialRouteName: 'Login',
    }
);

Output

screenshot_1532411065

My Environment

software version
react-navigation 2.9.0
react-native 0.56.0
node 8.10.0
npm or yarn 5.10.0
@simpleblack
Copy link

simpleblack commented Jul 24, 2018

The same problem

software version
react-navigation 2.9.0
react-native 0.55.4

@Dimous
Copy link

Dimous commented Jul 24, 2018

It is the opposite in my case. A big left margin appeared.
It seems like devs mixed up styles in 12b21f0

@Dimous
Copy link

Dimous commented Jul 24, 2018

public static navigationOptions: NavigationStackScreenOptions = {
        title: "Бюджет",
        headerRight: <View
            style={
                     {
                        flex: 1,
                        flexDirection: "row",
                        alignItems: "center",
                        justifyContent: "space-between",
                        width: 28+28+10,
                        marginRight: 10,
                    }
            }
        >
            <TouchableOpacity
                onPress={
                    () => {}
                }
            >        
                <Feather
                    name="filter"
                    size={28}
                    color="#000000"
                />
            </TouchableOpacity>
            <TouchableOpacity
                onPress={
                    () => {}
                }
            >            
                <Feather
                    name="plus"
                    size={28}   
                    color="#000000"                
                />
            </TouchableOpacity>
        </View>,
        headerStyle: {
            elevation: 1,
            marginBottom: 1,
            backgroundColor: "#fafafa",            
        },
        headerTitleStyle: {
            fontWeight: "200",
            fontFamily: "Roboto",
        },        
        headerTransparent: true,
        headerTitleAllowFontScaling: true,
    };

screenshot_1532432181

@Ariel-Rodriguez
Copy link

I am facing same problem

image

image

Sharing my work around to avoid this, until this issue gets solved. (However, margins are still wrong)

  static navigationOptions = {
    title: 'Seguidores',
    // Empty view to avoid small bug https://github.com/react-navigation/react-navigation/issues/4754
    headerRight: <View />,
  }

@brentvatne
Copy link
Member

thanks @Ariel-Rodriguez for the info, I'll fix this right away

@ShawnSheehan
Copy link

Having the same issue as @Dimous & @Ariel-Rodriguez, happened when I upgraded from 2.3 release.

@brentvatne
Copy link
Member

fixed in 2.9.1, thank you everybody for the info to help track it down!

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