Better way for "refresh" and "setSelection" after Update ListView (android)
Posted
by Dennie
on Stack Overflow
See other posts from Stack Overflow
or by Dennie
Published on 2009-10-26T14:34:29Z
Indexed on
2010/04/05
9:03 UTC
Read the original article
Hit count: 449
In my ListView
, I choose an Item to "Add Favorite" and I have to do some stuff work, I fill data again to refresh the List, then I implement OnScrollListener
use setSelection(firstVisibleItem)
to set List display right on Item was added.
Are there any better way to do that. I mean like mCursor.requery()
or something like that in android APIs ? Or any suggest way?
© Stack Overflow or respective owner