summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jason Monk <jmonk@google.com> 2017-06-26 11:22:21 -0400
committer Jason Monk <jmonk@google.com> 2017-06-26 13:50:54 -0400
commitbdefffd1e806f8b7ffd5fdbe8159bee2c9d5bbb0 (patch)
tree1ef832c6ae45a0ea0e6917c2e0935a3c0230ab91
parent6a651f81b52dcdc6518f1fc138985365feae4bfb (diff)
Fix QS lock screen animation
Now that we have a footer, heights and clippings need to be adjusted to be more accurate. - Clip QS within its layout box regardless of its y translation - Calculate height diffs correctly Test: visual Change-Id: Ic46996e342cd1000215aa9256da920a7856bb5a4 Fixes: 62489284
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/QSFragment.java5
2 files changed, 5 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java b/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java
index 6b507645e4d0..8f1880039857 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java
@@ -161,7 +161,8 @@ public class QSAnimator implements Callback, PageListener, Listener, OnLayoutCha
QSTileLayout tileLayout = mQsPanel.getTileLayout();
mAllViews.add((View) tileLayout);
- int heightDiff = mQsPanel.getBottom() - mQs.getHeader().getBottom()
+ int height = mQs.getView() != null ? mQs.getView().getMeasuredHeight() : 0;
+ int heightDiff = height - mQs.getHeader().getBottom()
+ mQs.getHeader().getPaddingBottom();
firstPageBuilder.addFloat(tileLayout, "translationY", heightDiff, 0);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java b/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java
index aa01c9e4db8b..39ef6c51865d 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSFragment.java
@@ -256,7 +256,8 @@ public class QSFragment extends Fragment implements QS {
}
mHeader.setExpansion(mKeyguardShowing ? 1 : expansion);
mFooter.setExpansion(mKeyguardShowing ? 1 : expansion);
- int heightDiff = mQSPanel.getBottom() - mHeader.getBottom() + mHeader.getPaddingBottom();
+ int heightDiff = mQSPanel.getBottom() - mHeader.getBottom() + mHeader.getPaddingBottom()
+ + mFooter.getHeight();
mQSPanel.setTranslationY(translationScaleY * heightDiff);
mQSDetail.setFullyExpanded(expansion == 1);
@@ -265,7 +266,7 @@ public class QSFragment extends Fragment implements QS {
}
// Set bounds on the QS panel so it doesn't run over the header.
- mQsBounds.top = (int) (mQSPanel.getHeight() * (1 - expansion));
+ mQsBounds.top = (int) -mQSPanel.getTranslationY();
mQsBounds.right = mQSPanel.getWidth();
mQsBounds.bottom = mQSPanel.getHeight();
mQSPanel.setClipBounds(mQsBounds);