From 5d5deeb2567fd0f2e0d1664d2556d42716806e69 Mon Sep 17 00:00:00 2001 From: Fabian Kozynski Date: Tue, 18 Sep 2018 14:49:37 -0400 Subject: [PATCH] QSCustomizer updates transparent view height Updates the height of the transparent view that overlays the status bar when the QS Customizer panel is expanded whenever the configuration changes. Change-Id: Ic0dd4d07f8149ac8434495d2d0c5373329e034a6 Fixes: 115999397 Test: Visual & atest --- .../SystemUI/res/layout/qs_customize_panel_content.xml | 1 + .../android/systemui/qs/customize/QSCustomizer.java | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/packages/SystemUI/res/layout/qs_customize_panel_content.xml b/packages/SystemUI/res/layout/qs_customize_panel_content.xml index bb67c547c36e7..87b455129835a 100644 --- a/packages/SystemUI/res/layout/qs_customize_panel_content.xml +++ b/packages/SystemUI/res/layout/qs_customize_panel_content.xml @@ -17,6 +17,7 @@ -> diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java b/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java index 3f7eeb81e58e4..dc17dd8fee633 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java +++ b/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java @@ -69,6 +69,7 @@ public class QSCustomizer extends LinearLayout implements OnMenuItemClickListene private final QSDetailClipper mClipper; private final LightBarController mLightBarController; private final TileQueryHelper mTileQueryHelper; + private final View mTransparentView; private boolean isShown; private QSTileHost mHost; @@ -108,6 +109,7 @@ public class QSCustomizer extends LinearLayout implements OnMenuItemClickListene mToolbar.getNavigationIcon().setTint(accentColor); mToolbar.getOverflowIcon().setTint(accentColor); mRecyclerView = findViewById(android.R.id.list); + mTransparentView = findViewById(R.id.customizer_transparent_view); mTileAdapter = new TileAdapter(getContext()); mTileQueryHelper = new TileQueryHelper(context, mTileAdapter); mRecyclerView.setAdapter(mTileAdapter); @@ -127,6 +129,14 @@ public class QSCustomizer extends LinearLayout implements OnMenuItemClickListene protected void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); updateNavBackDrop(newConfig); + updateResources(); + } + + private void updateResources() { + LayoutParams lp = (LayoutParams) mTransparentView.getLayoutParams(); + lp.height = mContext.getResources().getDimensionPixelSize( + com.android.internal.R.dimen.quick_qs_offset_height); + mTransparentView.setLayoutParams(lp); } private void updateNavBackDrop(Configuration newConfig) {