react-native-swipeout 不适用于 android

react-native-swipeout not working for android

它适用于 ios,但有些不适用于 Android。我正在使用 tab navigationFlatList。在 FlatList 中,我正在使用 Swipeout。以下代码为例。

const renderItem =()=>{
  return (
    <Swipeout {...swipeAction(index,item, 'REMOVE ITEM',) }>
        <View>
            <Text>Swipe me left</Text>
        </View>
    </Swipeout>
  )
}
const list= <FlatList renderItem={renderItem} />

TabNavigator({
  itemList: { screen: list },
  navigationOptions: {
    header: null,
  }
})

只需要为选项卡导航器添加一个额外的参数。swipeEnabled: false

const renderItem =()=>{
 return (
   <Swipeout {...swipeAction(index,item, 'REMOVE ITEM',) }>
    <View>
        <Text>Swipe me left</Text>
    </View>
   </Swipeout>
 )
}
const list = <FlatList renderItem={renderItem} />
TabNavigator({
  itemList: { screen: list },
  navigationOptions: {
  header: null,
  swipeEnabled: false,        
 }
})