Merge "Limit translation of bottom panel snapping to not overshoot." into cw-f-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
81b4314540
@@ -306,8 +306,9 @@ public class WatchListDecorLayout extends FrameLayout
|
|||||||
if (mListView.getChildCount() > 0) {
|
if (mListView.getChildCount() > 0) {
|
||||||
if (mListView.getLastVisiblePosition() >= mListView.getCount() - 1) {
|
if (mListView.getLastVisiblePosition() >= mListView.getCount() - 1) {
|
||||||
View lastChild = mListView.getChildAt(mListView.getChildCount() - 1);
|
View lastChild = mListView.getChildAt(mListView.getChildCount() - 1);
|
||||||
setScrolling(mBottomPanel,
|
setScrolling(mBottomPanel, Math.max(
|
||||||
lastChild.getY() + lastChild.getHeight() - mBottomPanel.getTop());
|
0,
|
||||||
|
lastChild.getY() + lastChild.getHeight() - mBottomPanel.getTop()));
|
||||||
} else {
|
} else {
|
||||||
// shift to hide the frame, last child is not the last position
|
// shift to hide the frame, last child is not the last position
|
||||||
setScrolling(mBottomPanel, mBottomPanel.getHeight());
|
setScrolling(mBottomPanel, mBottomPanel.getHeight());
|
||||||
|
|||||||
Reference in New Issue
Block a user