overflow visible on ListView on Android
See original GitHub issueDescription
I want to show the current item of a ListView at the center and show the prev and next item (if available) to the left and right. I use the pagination feature (pagingEnabled={true}
) so the user can snap between the items.
On iOS it works fine, I can see the prev and next items but on Android they don’t appear
Reproduction
- Create a ListView, and set the width the ListView as the width of the elements inside it, enable pagingEnabled too.
- The prev and next items are in overflow outside the ScrollView
On iOS it looks fine (I can see the prev/next items in overflow) but on Android they are not visible even if I enable the new FlatUI / Nodes mode
It’s roughly the code to reproduce the problem https://rnplay.org/apps/CyiVcQ, I will link a project with the Android FlatUI mode enabled as soon as I can.
P.S In the example the width are not correct so it doesn’t look well (because the listview should have at the center the active item)
I hope it’s clear enough
Solution
The overflow should be visible on Android when using the new Flat UI mode, I tried adding setClipChildren/padding etc using a custom scroll view but without luck (they still don’t appear)
Additional Information
- React Native version: 0.41.2
- Platform: Android
- Operating System: MacOS
Issue Analytics
- State:
- Created 7 years ago
- Reactions:5
- Comments:7 (2 by maintainers)
Hi @bsonntag @hramos , I need to test again with the new version of React Native, but it didn’t worked when I tried the last time (overflow was not visible even with flatlist). Anyway I fixed my issue by manually disabling the clip children/etc using Java.
I will test again when I have a bit of free time and, if I encounter the same issue with FlatList again, I will open a new issue
Confirmed problem still exist on SectionList.
New issue created https://github.com/facebook/react-native/issues/14416