For a direct scroll:
getListView().setSelection(21);
For a smooth scroll:
getListView().smoothScrollToPosition(21);
More Related Contents:
- How to implement Android Pull-to-Refresh
- Android ListView Selector Color
- How do I create a ListView with rounded corners in Android?
- SearchView In ListView having a custom Adapter
- ListView with Add and Delete Buttons in each Row in android
- Android: Implementing progressbar and “loading…” for Endless List like Android Market
- Android List view refresh
- How to show installed app list in a listview without Checkbox getting unchecked when listview is scrolled?
- Endless RecyclerView with ProgressBar for pagination
- java.lang.NullPointerException: Attempt to invoke virtual method ‘int android.view.View.getImportantForAccessibility()’ on a null object reference
- using notifyItemRemoved or notifyDataSetChanged with RecyclerView in Android
- Android List view layout Similar to Google play
- Using Picasso library with ListView
- How to implement search in CustomListView based on class item of POJO class in Android?
- Passing touch events to the parent view
- Showing the current selection in a listview
- How to manage dividers in a PreferenceFragment?
- Android: Radio button in custom list view
- Different row layouts in ListView
- Gmail style listview
- setVisibility(GONE) view becomes invisible but still occupies space
- Unable to start activity:UnsupportedOperationException: addView(View, LayoutParams) is not supported in AdapterView
- Disable Scrolling in child Recyclerview android
- Is there any difference between `ListView.invalidateViews()` and ‘Adapter.notifyDataSetChanged()’?
- How to put list items at the bottom of list view in Navigation Drawer like Foursquare
- how to set choice mode single for listview with images
- ListView with alphabets on the right, like the iPhone. Is it possible?
- Using custom simpleCursorAdapter
- Custom ListView adapter, strange ImageView behavior
- Android getting exact scroll position in ListView