question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

overflow visible on ListView on Android

See original GitHub issue

Description

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:closed
  • Created 7 years ago
  • Reactions:5
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
marcoaciernocommented, Jun 1, 2017

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

0reactions
lsps9150414commented, Jun 9, 2017

Confirmed problem still exist on SectionList.

New issue created https://github.com/facebook/react-native/issues/14416

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I check if a View is visible (android listview)
You can use view.getVisibility() . The result will be View.VISIBLE , View ...
Read more >
Overflow Items in Android - GeeksforGeeks
Overflow items are items of the overflow menu available in the ToolBar in the Android application. The elements present in the overflow menu ......
Read more >
ListView - Android Developers
The list will automatically scroll to the bottom when a data set change notification is received and only if the last item is...
Read more >
Newest 'android-listview' Questions - Stack Overflow
I have a list view which is made from strings. There are two items in it. // System.out.println("X->"+listView.getLastVisiblePosition()+"Y->"+ ...
Read more >
Android Beginner Tutorial #8 - Custom ListView Adapter For ...
Android Beginner Tutorial #8 - Custom ListView Adapter For Displaying Multiple ColumnsBy the end of this video you will know how to:1) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found