@jemise111 This works like a charm but In the props we put the amount of pixels for left or right swipe but after the orientation of device the pixels changed and the sizes should be changed.is their a way to capture this functionality easily without working with orientation change? thanks in advance
Hey @asela-wijesinghe, as a small perf optimization the layout is only calculated once by default. There is a prop you can pass to the SwipeListView called recalculateHiddenLayout={true} which I think should solve your issue. It should look like so:
<SwipeListView
recalculateHiddenLayout={true}
dataSource={this.ds.cloneWithRows(this.state.listViewData)}
renderRow={ data => (
<TouchableHighlight
onPress={ _ => console.log('You touched me') }
style={styles.rowFront}
underlayColor={'#AAA'}
>
<View>
<Text>I'm {data} in a SwipeListView</Text>
</View>
</TouchableHighlight>
)}
renderHiddenRow={ (data, secId, rowId, rowMap) => (
<View style={styles.rowBack}>
<Text>Left</Text>
<View style={[styles.backRightBtn, styles.backRightBtnLeft]}>
<Text style={styles.backTextWhite}>Right</Text>
</View>
<TouchableOpacity style={[styles.backRightBtn, styles.backRightBtnRight]} onPress={ _ => this.deleteRow(secId, rowId, rowMap) }>
<Text style={styles.backTextWhite}>Delete</Text>
</TouchableOpacity>
</View>
)}
leftOpenValue={75}
rightOpenValue={-150}
/>
After passing that prop it worked perfectly for me:

Let me know if this does the trick for you, thanks!
@jemise111
It worked Thank You :)
Most helpful comment
Hey @asela-wijesinghe, as a small perf optimization the layout is only calculated once by default. There is a prop you can pass to the
SwipeListViewcalledrecalculateHiddenLayout={true}which I think should solve your issue. It should look like so:After passing that prop it worked perfectly for me:
Let me know if this does the trick for you, thanks!