Back to the Head of ListView - Android android.widget

Android examples for android.widget:ListView

Description

Back to the Head of ListView

Demo Code

import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.ListAdapter;
import android.widget.ListView;

public class Main{


    public static void toHead(ListView listview) {
        listview.requestFocusFromTouch();
        listview.setSelection(0);/*from w  w w  .j a v  a  2s.  c  o  m*/
    }

}

Related Tutorials