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

when touch to Android Back Button, nothing happens ! #2546

Closed
duyhung16 opened this issue Oct 25, 2017 · 5 comments
Closed

when touch to Android Back Button, nothing happens ! #2546

duyhung16 opened this issue Oct 25, 2017 · 5 comments

Comments

@duyhung16
Copy link

duyhung16 commented Oct 25, 2017

Version

Tell us which versions you are using:

  • react-native-router-flux v4.0.0-beta.20
  • react-native v0.47.2

Expected behaviour

At home screen and android device, when touch to Android Back Button, app will be exist

Actual behaviour

when touch to Android Back Button, nothing happens !

<Router createReducer={reducerCreate}>
  <Modal transitionConfig={() => ({ screenInterpolator: CardStackStyleInterpolator.forFadeFromBottomAndroid })}>
    <Stack hideNavBar>
      <Drawer headerMode='none' contentComponent={Sidebar}>
        <Scene initial key='home' component={HomeScreen}/>
      </Drawer>
    </Stack>
    <Scene key='search' component={SearchScreen} title='Tìm kiếm' hideNavBar />
    <Scene key='item' component={ItemScreen} hideNavBar />
    <Stack key='room' hideNavBar>
      <Drawer headerMode='none' drawerPosition='right' contentComponent={ChatBoxSettingScreen}>
        <Scene key='roomChild' component={RoomScreen} />
      </Drawer>
    </Stack>
    <Scene key='createRoom' component={CreateRoomScreen} hideNavBar />
    <Scene key='webView' component={WebViewScreen} />
  </Modal>
</Router>
@duyhung16 duyhung16 changed the title when touch to Android Back Button, nothing happened ! when touch to Android Back Button, nothing happens ! Oct 25, 2017
@daviscabral
Copy link
Collaborator

Do you have any BackHandler.addEventListener in your app that might be affecting it?

@Maxitk
Copy link

Maxitk commented Nov 10, 2017

I have the same problem,how can I solve?
I have checked all my codes,there are no backHandler at all.

@yangningBU
Copy link

I'm having the same problem as well. No custom handler set. I do believe it started happening when once I added a nested , but I will try to attach a reproducible package.

@yangningBU
Copy link

I believe this is a dupe of #2540

@aksonov
Copy link
Owner

aksonov commented Jan 5, 2018

I just checked Example, hardware back works well on Android.

@aksonov aksonov closed this as completed Jan 5, 2018
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

5 participants