From 5025f42203808d25650ed55d49f498ed3427493a Mon Sep 17 00:00:00 2001 From: Jason Monk Date: Tue, 8 Mar 2016 13:48:05 -0500 Subject: [PATCH] Fix QS translation on tablets Now that QS sits inside a density container, the density container should be translated rather than the qs container. Bug: 27474427 Change-Id: Ia516f1927362cdffe6f906fca1d7ce583542d002 --- .../systemui/statusbar/phone/NotificationPanelView.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java index 9c6f2c53f9e3b..d50e67aaefbef 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java @@ -92,6 +92,7 @@ public class NotificationPanelView extends PanelView implements private KeyguardUserSwitcher mKeyguardUserSwitcher; private KeyguardStatusBarView mKeyguardStatusBar; protected QSContainer mQsContainer; + private DensityContainer mQsDensityContainer; private KeyguardStatusView mKeyguardStatusView; private TextView mClockView; private View mReserveNotificationSpace; @@ -217,8 +218,8 @@ public class NotificationPanelView extends PanelView implements super.onFinishInflate(); mKeyguardStatusBar = (KeyguardStatusBarView) findViewById(R.id.keyguard_header); mKeyguardStatusView = (KeyguardStatusView) findViewById(R.id.keyguard_status_view); - DensityContainer container = (DensityContainer) findViewById(R.id.qs_density_container); - container.addInflateListener(new InflateListener() { + mQsDensityContainer = (DensityContainer) findViewById(R.id.qs_density_container); + mQsDensityContainer.addInflateListener(new InflateListener() { @Override public void onInflated(View v) { mQsContainer = (QSContainer) v.findViewById(R.id.quick_settings_container); @@ -2209,7 +2210,7 @@ public class NotificationPanelView extends PanelView implements protected void setVerticalPanelTranslation(float translation) { mNotificationStackScroller.setTranslationX(translation); - mQsContainer.setTranslationX(translation); + mQsDensityContainer.setTranslationX(translation); } protected void updateStackHeight(float stackHeight) {