Java Code Examples for android.widget.ListView.smoothScrollToPosition()

The following are Jave code examples for showing how to use smoothScrollToPosition() of the android.widget.ListView class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: boohee_v5.6   File: ListViewUtils.java   Source Code and License Vote up 7 votes
public static void smoothScrollListView(ListView listView, int position) {
    if (VERSION.SDK_INT >= 11) {
        listView.smoothScrollToPositionFromTop(0, 0);
    } else if (VERSION.SDK_INT >= 8) {
        listView.smoothScrollToPosition(0);
    } else {
        listView.setSelection(position);
    }
}