gusgard / react-native-swiper-flatlist

👆 Swiper component implemented with FlatList using Hooks & Typescript + strict automation tests with Detox

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Horizontal padding on grandparent View prevents full manual swipe

digicommons opened this issue · comments

When setting horizontal padding on a grandparent View, manual swipes don't swipe fully. With every swipe the displayed portion of the previous element increases.
When pressing the pagination dots, the elements swipe fully.

React Native version: 0.68.2

Steps To Reproduce

  1. Add horizontal padding to (grand-) parent element
  2. Swipe elements manually

See example at: https://snack.expo.dev/V1LymC8tf

Screenshot:

Screenshot_20220803-192815

 <View style={{width:width, paddingHorizontal: 20}} >
            <Image
              source={{uri: item}}
              style={{width: '100%', height: '100%'}}
            />
 </View>

now you can use padding like this by modifying your image styling and add padding to the parent view of render items

now you can use padding like this by modifying your image styling and add padding to the parent view of render items

Thank you, that works great!