Tuesday, 8 December 2015

Android, how to keep list view's scroll position when user come back from the detail page


If you have a list page, and it will show another page if users click one of the items. If the user scroll the list page to the bottom and then click one of the items, when the user back to the list page, you may want keep the list page on the bottom.

you can solve the issue very simply:

add android:launchMode="singleTop" into your list activity in AndroidMainfest.xml.





I have another post explains this setting and issues it solves:

http://baiduhix.blogspot.co.uk/2015/09/android-parent-activity-destroyed.html?q=android:launchMode



No comments:

Post a comment