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

TabNavigator Android back button

Open isghanim opened this issue 6 years ago • 5 comments

Hi there! I'm using your package with a screen inside a TabNavigator and it looks like my back button callback is only being called from the second time the tab is changed. What I mean is, when I arrive at the screen the callback is not called when I press back on the device. Only when I navigate away from the screen and then come back does the back button behave as I expect.

isghanim avatar Jun 04 '18 21:06 isghanim

@isghanim i have same issue did you solve it?

vaqif14 avatar Sep 25 '18 10:09 vaqif14

@isghanim @vaqif14 same here, any updates?

eabdullazyanov avatar Mar 27 '19 17:03 eabdullazyanov

+1

adimshev avatar Jun 14 '19 22:06 adimshev

<Tab.Navigator lazy={false} >

I solved with the above code

MR03web avatar May 14 '20 07:05 MR03web

@MR03web solution didn't work for me. Handling of the Android back button in a TabNavigator is not yet supported.

The section 'Custom Android back button behavior' in the react-navigation docs says:

The presented approach will work well for screens that are shown in a StackNavigator. Custom back button handling in other situations may not be supported at the moment (eg. A known case when this does not work is when you want to handle back button press in an open drawer. PRs for such use cases are welcome!).

andrekovac avatar Aug 28 '20 09:08 andrekovac