summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/BaseRecyclerView.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/BaseRecyclerView.java')
-rw-r--r--src/com/android/launcher3/BaseRecyclerView.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/launcher3/BaseRecyclerView.java b/src/com/android/launcher3/BaseRecyclerView.java
index f8ef1e156..4cb050e24 100644
--- a/src/com/android/launcher3/BaseRecyclerView.java
+++ b/src/com/android/launcher3/BaseRecyclerView.java
@@ -264,7 +264,7 @@ public abstract class BaseRecyclerView extends RecyclerView
// Calculate the current scroll position, the scrollY of the recycler view accounts for the
// view padding, while the scrollBarY is drawn right up to the background padding (ignoring
// padding)
- int scrollY = getScrollTop(scrollPosState);
+ int scrollY = Math.max(0, getScrollTop(scrollPosState));
int scrollBarY = mBackgroundPadding.top +
(int) (((float) scrollY / availableScrollHeight) * availableScrollBarHeight);