-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Toggling tabs not working after poping back in Android #839
Comments
react-native-scrollable-tab-view version: 0.8.0. React native version:0.51 |
@skv-headless could you please fix it? |
+1 |
5 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
Should be related to this: |
Hey Guys, I solved my problem setting style flex to 1 when component is visible. We use react-native-navigation, so we implemented setOnNavigatorEvent to detect when the component is visible or not.
Why ? There is a bug for viewPagerAndroid when navigation goes back to previous screen after pushes a new one, it does not trigger onLayout again and the component does not re-render. As it was suggested in these threads below to reinforce layout state by changing flex style when the screen is visible or not. |
@fpauer Perfect. It works for me! Thank you so much! |
@fpauer Thank's. I works for me! |
@fpauer Can you please show the full class? As my event is not fired. I am passing the navigator through props to the child screens. |
This will probably fix it for most people. find the index.js in node_modules/react-scrollable-tab-view and replace the contents. Fixed it for me and works with ios and android still. |
I have a react-native-scrollable-tab-view working well in screen A and then push to screen B. In Screen B I do nothing and pop back to screen A. then in Screen A I can not toggle tabs in Screen A any more. It works well in IOS but bad in Android.
The text was updated successfully, but these errors were encountered: