diff options
| author | 2016-09-15 22:27:52 +0000 | |
|---|---|---|
| committer | 2016-09-15 22:27:52 +0000 | |
| commit | e455850fbd6bff2f524a66df9ccc3e8fce3638a7 (patch) | |
| tree | 73fd837c9944d06d98e8ce755cf9aeebed74caf5 | |
| parent | bf1849f7620a3d1b9c9d23421d8f29e5db211a80 (diff) | |
| parent | b1440bdb17bff2b0b4ac404d52ff67239fd8f8c6 (diff) | |
Limit translation of bottom panel snapping to not overshoot.
am: b1440bdb17
Change-Id: I5e34ac21774e9c781f3f3aef0b0a37fe81e1f747
| -rw-r--r-- | core/java/com/android/internal/widget/WatchListDecorLayout.java | 5 |
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()); |