react-native-elements/SwipeDeck android bug

来源:互联网 发布:unity3d 获取鼠标位置 编辑:程序博客网 时间:2024/06/03 23:02

安装react-native-elements库文件
详见: https://github.com/react-native-training/react-native-elements/blob/master/default_installation.md
SwipeDeck ios 运行结果:
normal.gif
Android 运行结果:
wrong.gif
修改代码:
SwipeDeck/renderCards如下:
fix.png
结果:
androidnormal.gif

zindex:是rn在0.30开始支持的属性。
zIndex controls which components display on top of others. Normally, you don’t use zIndex. Components render according to their order in the document tree, so later components draw over earlier ones. zIndex may be useful if you have animations or custom modal interfaces where you don’t want this behavior。
zindex属性可以控制组件显示在其他组件上,正常情况,你不需要使用。组件通过组件树,后一个覆盖前一个。zindex可以用于动画或者自定义modal,让你决定谁可以显示在上面。

相关问题:
https://github.com/react-native-training/react-native-elements/issues/418
https://github.com/facebook/react-native/issues/8968