Chris Banes
HomeMeTalks

ListView

ListView, Android Views

ListView - Keeping Position

Last week Joaquim Verges [https://plus.google.com/107942105369460253496] asked me a question about ListView. I’ve finally got around to writing up this solution and post. The Problem To paraphrase Joaquim, the problem is: > I have a ListView populated from a CursorLoader. When I swap to a cursor with new items on top, I use setSelectionFromTop() [https://developer.android.com/reference/android/widget/ListView.html#setSelectionFromTop(int, int)] to keep the ListView at the same visible position
Chris Banes
Chris BanesFeb 21, 2013•1 min read
Chris Banes © 2020
HomeMeTalks