intergalacticspacehighway / react-native-reanimated-zoom

Component for zooming react native views. 🔎
MIT License
315 stars 19 forks source link

can't swipe item in Flatlist with one finger on Android #21

Open silencie opened 1 year ago

silencie commented 1 year ago

iOS works as expected but on Android I need to use two finger to be able to swipe item in Flatlist

https://user-images.githubusercontent.com/115603511/219297795-825f6796-02bb-46e9-9232-9710e0be5e08.mp4

intergalacticspacehighway commented 1 year ago

Weird, I can look into this. Can you confirm first if you are using this approach to make it work with FlatList?

MadeinFrance commented 1 year ago

Hi @intergalacticspacehighway thanks for providing a demo with a ScrollView.

I think there's something when the PanHandlers activate. The solution would be to give an active offset: activeOffsetX: [-10, 10], before the Pan triggers onUpdate()

See it doesn't scroll with spacers around the ScrollView:

https://user-images.githubusercontent.com/1864359/233719163-b0e4fb1f-ccb6-4989-b48a-d560f0942185.mov

<>
      <Text
        style={{
          height: 200,
        }}>
        Spacer 1
      </Text>
      <ZoomFlatList
        data={data}
        pagingEnabled
        horizontal
        keyExtractor={item => item}
        renderItem={renderItem}
      />
      <Text
        style={{
          height: 300,
        }}>
        Spacer end
      </Text>
    </>

Help please

luckyxhu commented 1 year ago

yes, can only scroll by 2 finger