Closed typhoon2099 closed 6 years ago
I forgot to mention, I'm still having the same issue when using ScrollableTabView.ScrollableTabBar, the buttons don't work properly when navigating back to the Screen.
I'm having the same issue, anyone has some clues?
@typhoon2099 Have you found solution for this issue?
Not yet. It's the last bug in my project, I'm working on it so I'll post if I find a solution.
@typhoon2099 I`ve found solution. Just try using showModal API instead of Push screen API from react-native-navigation. Thats works for me!
Are you using the modal full screen so it looks like a page?
Yes, it definitely looks like usual screen, with top nav bar, back button (if needed etc)
It seems like this problem is related to https://github.com/wix/react-native-navigation/issues/1317
The react-native-navigation does not handle ViewPagerAndroid correctly.
In the issues they provide the way to fix temporally and you need to apply it to ScrollableTabView
@shuse2 Did you get this to work? Just so I understand we need to add the ViewPagerAndroid type view to the actual ScrollableTabView (like the inner component that it renders) or do we need to add it manually to the ScrollableTabView code itself, that lives in node_modules?
It kinda works, but I needed to add like
< ScrollableTabView style={{ flex: this.state.visible ? 1 : 0 }} />
when I use.
Since i don't need the animation between tabs for now, so my solution was to just fork and not use ViewPagerAndroid.
I just realized that latest version is not pushed to npm, and on the latest version it doesn't use ViewPagerAndroid
.
so, if you use the master repo directly, then it works good!!
Thank u shuse2. I worked for me.
I have react-native-navigation installed to handle navigating through the app. When I navigate back to a page with a ScrollableTabView then the buttons stop working. The tab changes it's styling to be active but the coloured bar stays still, as does the active ScrollView. Furthermore the tabs can still be swiped between but they do not snap to the closest ScrollView. I'm using a custom TabBar:
Any clues as to why this isn't working properly are greatly appreciated, currently I can't figure out how the ScrollableTabView is figuring out the current active tab while it's still working so I haven't been able to debug it when it's not working.