I choose an item in my list to edit (I use Context Menu) , then I populate data to “refresh” the List and my List will display in “Top-Down” order. I want to display my list right in position of the item I have just edited (I don’t have to drag scrollbar down to find it). So, how can I do that?
Share
Use the
ListView.setSelection(int position)method. It will select the list item at the specified position, but only if not in touch mode. If in touch mode, it will just scroll to the specified position so that the item atpositionis the first on the screen.From http://d.android.com/: