sc12070 / react-native-drag-sort-gridview

A draggable and sortable grid view for react native
22 stars 8 forks source link

Scroll in Android is not working #2

Open nosov-vitaliy opened 1 year ago

nosov-vitaliy commented 1 year ago

Thanks for cute component, I have a problem to scroll items in android. Scroll is not working (nothing happened on scrolling)

sc12070 commented 1 year ago

Thank you for feedback. I tried my example and it works fine. ezgif-4-cfa91d4cbb

I think there maybe several possible reasons cause this issue.

  1. The style of the DraggableGridView. The common reason is the height of DraggableGridView have been set. If we want to define the height of grid view, we have to set it in parent's style and keep the height of DraggableGridView to be undefined. "Defined list size example" is one of example

  2. If we cannot scroll in edit mode without holding any item, this properly caused by the items in renderItem are too large in size. The items were wrapped by PanResponder and the PanResponder block the scroll. However, we may make use of the space to scroll. For example, the white area can be used to scroll in "Simplest example". Screenshot 2023-05-24 at 9 52 14 PM

  3. If the issue happened when you are holding an item, there would be a bit complicated. I recommend to try "Defined list size example". Copy and modify the style of "Defined list size example" may help.

If the problem cannot be solved by above solution, share your code if you do not mind. Or please provide more information including the device model, os version and situation. Thanks.

nosov-vitaliy commented 1 year ago

Hello, I tried your example from your GitHub repository. I can see scroll in android now. But there is a situation, when I try quick re-arrange elements and it is stuck and not move more

I recorded a video

https://github.com/sc12070/react-native-drag-sort-gridview/assets/5630611/b8c54a31-4359-4bc5-9e3b-bedd65eaed00

sc12070 commented 1 year ago

Hello, I tried your example from your GitHub repository. I can see scroll in android now. But there is a situation, when I try quick re-arrange elements and it is stuck and not move more

I recorded a video

Thanks for reporting this issue. It had been fixed in v1.4.2.