Skip to content

Defining custom buttons on root scene #1080

Closed
@AlessandroCorradini

Description

@AlessandroCorradini

Version

Tell us which versions you are using:

How can I set my custom backButton only one time? I'm using react-native-vector-icons and this is my custom backButton.

const BackButton =
    <TouchableHighlight onPress={()=> Actions.pop()} style={{ width: 45, height: 45, position: 'absolute', top: 0, left: 0, justifyContent: 'center', alignItems: 'center'}} underlayColor="transparent" activeOpacity={0.3}>
        <Icon name="arrow-back" size={30} color="white" />
    </TouchableHighlight>;

I tried to apply renderBackButton to root scene, but doesn't work. Ex. navigationBarStyle and titleStyle work on root scene. If I have 100 scenes, adding renderBackButton method for each scene is very repetitive.

Thanks,
Alessandro.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions