Android make sure list view is fully displayed when expanded

The following situation: I have a ListFragment, if you click on a list item, some views inside the list item become visible, so the list item itself expands. Now imagine that the pressed list item is the last in the list, the extended part will not be visible. Is there a way to make the list scroll a bit so that the full list item is displayed?

+3
source share
1 answer

Try the following: yourListView.scrollTo(0, yourListView.getHeight());

0
source

All Articles