Android examples for User Interface:View
check if View Can Pull Down
//package com.java2s; import android.view.View; import android.widget.AbsListView; public class Main { public static boolean checkCanPullDown(View view) { return !canChildScrollUp(view); }/*from w ww .ja va 2 s .c om*/ public static boolean canChildScrollUp(View view) { if (android.os.Build.VERSION.SDK_INT < 14) { if (view instanceof AbsListView) { final AbsListView absListView = (AbsListView) view; return absListView.getChildCount() > 0 && (absListView.getFirstVisiblePosition() > 0 || absListView .getChildAt(0).getTop() < absListView .getPaddingTop()); } else { return view.getScrollY() > 0; } } else { return view.canScrollVertically(-1); } } }