X
X
xne712472015-04-14 01:14:00
Android
xne71247, 2015-04-14 01:14:00

ListView rewinds to the beginning, how to undo?

I scroll the ListView down, then when I set setAdapter, the ListView scrolls to the very beginning, how can I cancel this action? Let him show the place where I stopped and do not reroll.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
anyd3v, 2015-04-14
@anyd3v

You didn't describe what adapter you are using.
Correct but difficult option
1. Store information in the database after loading (this will also give you offline mode)
2. Load the cursor through Loader
3. Call swapCursor on CursorAdapter when the cursor is loaded in the loader, and not recreate a new adapter

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question