smooth Scroll ListView - Android android.widget

Android examples for android.widget:ListView

Description

smooth Scroll ListView

Demo Code

import android.os.Build;
import android.widget.ListView;

public class Main{

    public static void smoothScrollListView(ListView listView, int position) {
        if (VERSION.SDK_INT > 7) {
            listView.smoothScrollToPositionFromTop(0, 0);
        } else {//from w w w  .ja  v  a2 s  .c o  m
            listView.setSelection(position);
        }
    }

}

Related Tutorials