summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2016-09-15 22:23:16 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-09-15 22:23:19 +0000
commit81b43145407567052c8ca71c400b3b30e81f20e9 (patch)
treeb269322ce8b7af904aa727aa9021c9142d994bb7
parent270bc5bc2e97ddbc87dbc3e9b25b91806041d1a3 (diff)
parentb1440bdb17bff2b0b4ac404d52ff67239fd8f8c6 (diff)
Merge "Limit translation of bottom panel snapping to not overshoot." into cw-f-dev
-rw-r--r--core/java/com/android/internal/widget/WatchListDecorLayout.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/java/com/android/internal/widget/WatchListDecorLayout.java b/core/java/com/android/internal/widget/WatchListDecorLayout.java
index 538cecaec616..5b49611fa4b0 100644
--- a/core/java/com/android/internal/widget/WatchListDecorLayout.java
+++ b/core/java/com/android/internal/widget/WatchListDecorLayout.java
@@ -306,8 +306,9 @@ public class WatchListDecorLayout extends FrameLayout
if (mListView.getChildCount() > 0) {
if (mListView.getLastVisiblePosition() >= mListView.getCount() - 1) {
View lastChild = mListView.getChildAt(mListView.getChildCount() - 1);
- setScrolling(mBottomPanel,
- lastChild.getY() + lastChild.getHeight() - mBottomPanel.getTop());
+ setScrolling(mBottomPanel, Math.max(
+ 0,
+ lastChild.getY() + lastChild.getHeight() - mBottomPanel.getTop()));
} else {
// shift to hide the frame, last child is not the last position
setScrolling(mBottomPanel, mBottomPanel.getHeight());