Loading core/java/android/widget/AbsListView.java +3 −3 Original line number Diff line number Diff line Loading @@ -381,12 +381,12 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te /** * Maximum distance to overscroll by */ private int mOverscrollMax; int mOverscrollMax; /** * Content height divided by this is the overscroll limit. */ private static final int OVERSCROLL_LIMIT_DIVISOR = 3; static final int OVERSCROLL_LIMIT_DIVISOR = 3; /** * Used to request a layout when we changed touch mode Loading Loading @@ -2390,7 +2390,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te awakenScrollBars(); } private int getOverscrollMax() { int getOverscrollMax() { final int childCount = getChildCount(); if (childCount > 0) { return Math.min(mOverscrollMax, Loading core/java/android/widget/ListView.java +27 −4 Original line number Diff line number Diff line Loading @@ -1250,12 +1250,21 @@ public class ListView extends AbsListView { int findMotionRow(int y) { int childCount = getChildCount(); if (childCount > 0) { if (!mStackFromBottom) { for (int i = 0; i < childCount; i++) { View v = getChildAt(i); if (y <= v.getBottom()) { return mFirstPosition + i; } } } else { for (int i = childCount - 1; i >= 0; i--) { View v = getChildAt(i); if (y >= v.getTop()) { return mFirstPosition + i; } } } } return INVALID_POSITION; } Loading Loading @@ -3683,6 +3692,20 @@ public class ListView extends AbsListView { } } @Override int getOverscrollMax() { if (mStackFromBottom) { final int childCount = getChildCount(); if (childCount > 0) { return Math.min(mOverscrollMax, (getHeight() - getChildAt(0).getTop()) / OVERSCROLL_LIMIT_DIVISOR); } else { return mOverscrollMax; } } return super.getOverscrollMax(); } static class SavedState extends BaseSavedState { SparseBooleanArray checkState; LongSparseArray<Boolean> checkIdState; Loading Loading
core/java/android/widget/AbsListView.java +3 −3 Original line number Diff line number Diff line Loading @@ -381,12 +381,12 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te /** * Maximum distance to overscroll by */ private int mOverscrollMax; int mOverscrollMax; /** * Content height divided by this is the overscroll limit. */ private static final int OVERSCROLL_LIMIT_DIVISOR = 3; static final int OVERSCROLL_LIMIT_DIVISOR = 3; /** * Used to request a layout when we changed touch mode Loading Loading @@ -2390,7 +2390,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te awakenScrollBars(); } private int getOverscrollMax() { int getOverscrollMax() { final int childCount = getChildCount(); if (childCount > 0) { return Math.min(mOverscrollMax, Loading
core/java/android/widget/ListView.java +27 −4 Original line number Diff line number Diff line Loading @@ -1250,12 +1250,21 @@ public class ListView extends AbsListView { int findMotionRow(int y) { int childCount = getChildCount(); if (childCount > 0) { if (!mStackFromBottom) { for (int i = 0; i < childCount; i++) { View v = getChildAt(i); if (y <= v.getBottom()) { return mFirstPosition + i; } } } else { for (int i = childCount - 1; i >= 0; i--) { View v = getChildAt(i); if (y >= v.getTop()) { return mFirstPosition + i; } } } } return INVALID_POSITION; } Loading Loading @@ -3683,6 +3692,20 @@ public class ListView extends AbsListView { } } @Override int getOverscrollMax() { if (mStackFromBottom) { final int childCount = getChildCount(); if (childCount > 0) { return Math.min(mOverscrollMax, (getHeight() - getChildAt(0).getTop()) / OVERSCROLL_LIMIT_DIVISOR); } else { return mOverscrollMax; } } return super.getOverscrollMax(); } static class SavedState extends BaseSavedState { SparseBooleanArray checkState; LongSparseArray<Boolean> checkIdState; Loading