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

BackTitle dont work Android #2675

Closed
remch1990 opened this issue Dec 4, 2017 · 5 comments
Closed

BackTitle dont work Android #2675

remch1990 opened this issue Dec 4, 2017 · 5 comments
Assignees

Comments

@remch1990
Copy link

Version

Tell us which versions you are using:

  • react-native-router-flux v4.?
    "react-native-router-flux": "^4.0.0-beta.24",
  • react-native?
    "react-native": "^0.48.3",

backTitle={'back'}
Dont show nothing on Android

@Blapi
Copy link
Collaborator

Blapi commented Dec 6, 2017

Where do you implement this? Show your exact code please @remch1990 because it's difficult to help you there

@remch1990
Copy link
Author

with the Example code backTitle don't works on Android, this with the last update RNRF, with version 22 it works.

<Scene
            key="loginModal2"
            component={Login2}
            title="Login2"
            backTitle="Back"
            panHandlers={null}
            duration={1}
          />

@remch1990
Copy link
Author

??

@aksonov
Copy link
Owner

aksonov commented Jan 4, 2018

@Blapi could you look on this android issue?

@Blapi Blapi self-assigned this Jan 10, 2018
@Blapi
Copy link
Collaborator

Blapi commented Jan 10, 2018

Ok so after investigated on this, the point is that on NavBar.js

  if (!state.backButtonImage) {
    return (
      <HeaderBackButton
        onPress={onPress}
        title={state.backTitle}
        titleStyle={textButtonStyle}
        tintColor={tintColor}
        truncatedTitle={state.truncatedTitle}
      />
    );
  }

When you don't pass a backButtonImage, it should return this Component from react-navigation but this component is returning an Image with the back-arrow, so the backTitle is ignored.

So 2 solutions, either we implement an other Component which will be an other HeaderBackButton with the result we wish (requiring a PR), or either passing a fake path as backButtonImage, so the backTitle will be displayed but with a warning (quick crappy fix).

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

No branches or pull requests

3 participants