List of usage examples for android.widget ListView getListPaddingRight
public int getListPaddingRight()
From source file:Main.java
public static boolean canScrollList(final ListView lv, int direction) { final int childCount = lv.getChildCount(); if (childCount == 0) { return false; }//from ww w . j a v a2 s . co m final int firstPosition = lv.getFirstVisiblePosition(); final Rect listPadding = new Rect(lv.getListPaddingLeft(), lv.getListPaddingTop(), lv.getListPaddingRight(), lv.getListPaddingBottom()); if (direction > 0) { final int lastBottom = lv.getChildAt(childCount - 1).getBottom(); final int lastPosition = firstPosition + childCount; return lastPosition < lv.getCount() || lastBottom > lv.getHeight() - listPadding.bottom; } else { final int firstTop = lv.getChildAt(0).getTop(); return firstPosition > 0 || firstTop < listPadding.top; } }