React Native Card Carousel查看? [英] React Native Card Carousel view?

查看:91
本文介绍了React Native Card Carousel查看?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



有谁知道我们如何在React Native中实现这种视图,或者是否有任何可用的组件在那里可以帮助解决这个问题吗?



我也在F8 2016应用程序中看过,一直在寻找如何实现过渡以及类似旋转木马的水平视图可以使用 ScrollView 分页启用 ViewPagerAndroid Android。



F8是一个开源应用,
你可以看到那是什么它实际上是使用:
https:// github。 com / fbsamples / f8app / blob / master / js / common / ViewPager.js



此组件呈现所有页面。



如果您只想渲染可见和左右页面来节省内存,那么还有另一个构建在它上面的组件:
https://github.com/fbsamples/f8app/blob/master/js/common/Carousel.js



还有其他各种类似的实现:





但是我是我不推荐 https://github.com/leecade/react-native-swiper 它有几个问题。


Does anyone know how can we achieve this kind of view in React Native, or is there any available components out there that can help on this issue?

I've seen in F8 2016 app too, been searching on how to achieve the transition and the carousel-like view with horizontal scrolling.

解决方案

You can achieve this using ScrollView with paging enabled on iOS and ViewPagerAndroid on Android.

F8 being an open source app, you can see that's what it's actually using: https://github.com/fbsamples/f8app/blob/master/js/common/ViewPager.js

This component renders all pages.

If you only want to have the visible and left and right pages rendered to save memory, there's another component built on top of it that does it: https://github.com/fbsamples/f8app/blob/master/js/common/Carousel.js

There are various other similar implementations available:

However I'm not recommending https://github.com/leecade/react-native-swiper as I've had several issues with it.

这篇关于React Native Card Carousel查看?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆