React Native實現仿抖音視頻列表(滑動切換)

實現思路: 視頻播放採用react-native-video,很是好用的視頻播放庫,列表總體採用FlatList實現,每個item都佔一整屏(flex設爲1),再給FlatList設定pagingEnabled屬性(滑動滾動一屏),viewabilityConfig中設定可見區域滑動的閾值。react 效果圖: git 實現過程:github 個人代碼使用了react-native-ui-lib庫
相關文章
相關標籤/搜索