react-navigation icon indicating copy to clipboard operation
react-navigation copied to clipboard

Header title overlap back arrow

Open rutvikwebmobtech opened this issue 8 years ago • 7 comments

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

rutvikwebmobtech avatar Jul 24 '18 05:07 rutvikwebmobtech

The same problem

software version
react-navigation 2.9.0
react-native 0.55.4

simpleblack avatar Jul 24 '18 08:07 simpleblack

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

Dimous avatar Jul 24 '18 10:07 Dimous

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

Dimous avatar Jul 24 '18 11:07 Dimous

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 />,
  }

Ariel-Rodriguez avatar Jul 24 '18 15:07 Ariel-Rodriguez

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

brentvatne avatar Jul 24 '18 17:07 brentvatne

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

ShawnSheehan avatar Jul 24 '18 17:07 ShawnSheehan

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

brentvatne avatar Jul 24 '18 17:07 brentvatne