android - Go to a item in Listview without using smoothScrollToPosition -
i'd go (display) specific item in listview without scrolling. don't want animation i'd instantaneously transported desired item.
i'm using checkable listview : mylistview.setchoicemode(1) .
i understood mylistview.setselection(position) solution, when use it, nothing happens (maybe because it's checkable listview ?).
when use mylistview.smoothscrolltoposition(position), works have scroll animation don't want.
what ?
thanks.
try out:
mylistview.post(new runnable() { @override public void run() { mylistview.setselection(pos); view v = mylistview.getchildat(pos); if (v != null) { v.requestfocus(); } } }); from google developer list answer romain guy link
Comments
Post a Comment