react-native-swipeout不能用于android

时间:2018-04-26 18:47:32

标签: react-native swipe react-navigation

它正在为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,
  }
})

1 个答案:

答案 0 :(得分:0)

只需为标签导航器添加额外参数。select p.product_id, (select i.url from images i where i.product_id = p.product_id order by i.image_id limit 1 offset 0 ) as url1, (select i.url from images i where i.product_id = p.product_id order by i.image_id limit 1 offset 1 ) as url2, (select i.url from images i where i.product_id = p.product_id order by i.image_id limit 1 offset 2 ) as url3 from (select distinct product_id from images) p;

swipeEnabled: false