Android ListView setSelection() does not seem to work.
Posted
by alkar
on Stack Overflow
See other posts from Stack Overflow
or by alkar
Published on 2009-09-18T19:12:51Z
Indexed on
2010/05/04
6:58 UTC
Read the original article
Hit count: 1907
I have a ListActivity that implements onListItemClick() and calls a doSomething() function of the class. The latter contains l.setSelection(position) where l is the ListView object.
Now there is a onClickListener() listening for a button click that perfoms some actions and that too calls doSomething().
In the first case, the selected item get positioned appropriately, but in the latter, nothing happens.
Any clues about this strange behaviour and how I might make it work?
© Stack Overflow or respective owner