Android examples for User Interface:AdapterView
is AdapterView Top
import android.view.View; import android.widget.AdapterView; public class Main { private static boolean isAdapterViewTop(AdapterView adapterView) { if (adapterView != null) { int firstVisiblePosition = adapterView.getFirstVisiblePosition(); View childAt = adapterView.getChildAt(0); if (childAt == null || (firstVisiblePosition == 0 && childAt.getTop() == 0)) { return true; }/* w w w. ja v a2s .c o m*/ } return false; } }