-
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
Is RN Swiper incompatible with React Navigation TabNavigator? #389
Comments
I have the same problem |
I used a swiper inside Tab Navigator and it works fine for me. Try disabling swiping in TabBarOptions. |
@Roman2710 swipeEnabled and scrollEnabled are two options were closed, but the problem still exists, the image cannot be displayed. |
Maybe there's something wrong with the picture. Try to render a simple Component |
No, it's not. This component was tested in StackNavigator and it's working
fine...
|
@qinfensky 是TabNavigator的问题react-native-swiper安卓用的ViewPagerAndroid所以有的问题 |
@jiasaichao 我找到问题所在了,是‘lazyLoad: true,’,设置为‘true’就可以显示了,但是还是有明显缺陷,就是‘initialRouteName: 'Home'’这个TabNavigator指定初始路由的react-native-swiper不显示,其余的三个都正常显示,这是什么问题呢? |
@qinfensky 您好,我和你有同样的问题,首屏渲染的不可以显示,其他的都可以显示,请问这个问题你解决了吗? |
我现在的临时解决方案是,默认跳转到其他的Tab,然后其他页面componentDidMount的时候,setTimeout跳转回到第一个Tab,首次进入的时候,我准备加个浮层进度条,要不然会看到跳转的过程,就尴尬了 |
The same happens to me. Anyone with a workaround? Here ist my TabNavigatorConfig:
|
@qinfensky @afinal 我不准备解决这个问题了,自己写一个TabBar,我对TabBar要求也不高,点击切换就完了,想怎么显示自己控制,只用react-navigation中的StackNavigator,这样好扩展而且也有可能不用react-navigation用react-native-navigation这样切换起来比较方便,我一直纠结是用react-navigation还是react-native-navigation。 |
@jiasaichao 我上面贴了代码,这样也能很好的显示了,navigation用起来确实方便。目前问题算是解决了~ |
@qinfensky 嗯,解决了就行,估计以后bug解决了,你这个setTimeout也就不用加了。 |
@qinfensky 确实是个不错的方案,setTimeout 0也是可以的 |
Thank you @qinfensky |
still not working ... |
@smartPiz show me the code |
如果我早点翻到的话,我就不发issue了 @qinfensky 还是你这个方法管用啊 |
@StarOfLife 哈哈,现在 "react-native" 升级到了 "0.44.0","react-navigation"升级到了 "^1.0.0-beta.9"之后,不需要添加定时器了,直接渲染是没问题的,试试吧~ |
@qinfensky 我现在就是用的这个版本的,然后出的这个问题。现在只能是先用着定时器了 |
@StarOfLife 嗯,OK,能解决问题就好,有问题随时联络~ |
@qinfensky 您好,这个代码能私发我一下吗? |
What works for me was to set the
Hope it helps. |
timer invalid? @gusgard |
@qinfensky I didn't use any |
@qinfensky 不需要设置100,设置0就好了 |
@gusgard your solution solve my problems,thx |
@qinfensky it work! thank |
After I added the timer, I still could not display the picture and needed to slide manually @qinfensky |
@wangweifeng66 拼音?那就说中文啦,抱歉,我没在用这个组件了,现在具体细节我不知道了…… |
Hi guys, I ran into this issue as well on Android. Try setting animationEnabled to false on TabNavigatorConfig. That seems to fix the issue for me. |
Disabling the animation works, but is a really big drawback for the usability of the TabNavigator component. I'm looking for a better solution. Any help would be very appreciated :) |
Getting a same issue, Inside tabNavigator swiper content is not displaying, Any help provided on this issue will be helpful. |
Here are the timers: |
@qinfensky 不错,可以解决问题 |
加了定时器还是无法解决。 0.52.3 版本 |
@qinfensky why dose it work? what is the root cause? |
I hadn't used this component for a long time, and I was just trying to delay display and I was able to solve my problem. Now that "Swiper" and "React-Navigation" have been updated a lot, I guess the problem has been solved and I haven't had time to test it yet. |
When I use Swiper inside one of TabNavigation screen, slide's content become invisible (dots and right-left buttons still visible).
The text was updated successfully, but these errors were encountered: