Move to item in Listview without using smoothScrollToPosition

I would like to (show) a specific item in my list, but without scrolling. I don't need animation, but I would like to be instantly delivered to the desired element.

I'm using checked the listview control: mylistview.setChoiceMode(1)


I figured out what mylistview.setSelection(position)

is the solution, but when I use it nothing happens (maybe because this is a checked listview?).

When I use mylistview.smoothScrollToPosition(position)

it works well, but I clearly have this scroll animation I don't want.

What can I do?



source to share

1 answer

Try the following: Runnable() 
        public void run() 
            View v = myListView.getChildAt(pos);
            if (v != null) 


From this Google Developer list by Romain Guy Link



All Articles