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?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…