summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3
diff options
context:
space:
mode:
authorHyunyoung Song <hyunyoungs@google.com>2016-07-12 17:10:38 -0700
committerHyunyoung Song <hyunyoungs@google.com>2016-07-12 17:10:38 -0700
commitcd4b3003ad451fce5319ed8b688a27f62c884fe4 (patch)
treeffa55e4aa92f693b3546d1bfa1df84670dfd6b59 /src/com/android/launcher3
parent7ed42af3398c1764424ebbf2dd6e2a51e05eaf5f (diff)
downloadandroid_packages_apps_Trebuchet-cd4b3003ad451fce5319ed8b688a27f62c884fe4.tar.gz
android_packages_apps_Trebuchet-cd4b3003ad451fce5319ed8b688a27f62c884fe4.tar.bz2
android_packages_apps_Trebuchet-cd4b3003ad451fce5319ed8b688a27f62c884fe4.zip
all apps should pull down when there isn't scrollable thumb
b/30059445 Change-Id: I4d28b9718746398b078e329cb5a92d5991bc0102
Diffstat (limited to 'src/com/android/launcher3')
-rw-r--r--src/com/android/launcher3/allapps/AllAppsContainerView.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/launcher3/allapps/AllAppsContainerView.java b/src/com/android/launcher3/allapps/AllAppsContainerView.java
index 717ce74c7..7b1aaa9e0 100644
--- a/src/com/android/launcher3/allapps/AllAppsContainerView.java
+++ b/src/com/android/launcher3/allapps/AllAppsContainerView.java
@@ -269,8 +269,9 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
if (mAppsRecyclerView.getScrollBar().isNearThumb(point[0], point[1])) {
return false;
}
- // If scroller is at the very top, then it's okay for the container to be pulled down.
- if (Float.compare(0f, mAppsRecyclerView.getScrollBar().getThumbOffset().y) == 0) {
+ // IF scroller is at the very top OR there is no scroll bar because there is probably not
+ // enough items to scroll, THEN it's okay for the container to be pulled down.
+ if (mAppsRecyclerView.getScrollBar().getThumbOffset().y <= 0) {
return true;
}
return false;