2017-04-17 93 views

回答

0

你已經共享上面的鏈接可以在ios上正常工作,但不能在android上使用。 我一直在使用本機作出反應刷卡列表視圖

用法片段嘗試:

import { SwipeListView } from 'react-native-swipe-list-view'; 
render() { 
    const ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r2}); 
    return (
     <SwipeListView 
      dataSource={ds.cloneWithRows(dataSource)} 
      renderRow={ data => (
       <View style={styles.rowFront}> 
        <Text>I am {data} in a SwipeListView</Text> 
       </View> 
      )} 
      renderHiddenRow={ data => (
       <View style={styles.rowBack}> 
        <Text>Left</Text> 
        <Text>Right</Text> 
       </View> 
      )} 
      leftOpenValue={75} 
      rightOpenValue={-75} 
     /> 
    ) 
} 

請參考以下鏈接查看更多: https://github.com/jemise111/react-native-swipe-list-view