From ead032f96ef8c39c9a1955f88d5d36556ebb4421 Mon Sep 17 00:00:00 2001 From: Anton Potapov Date: Fri, 4 Nov 2022 15:03:41 +0000 Subject: [PATCH] Fix transparent view initial height Test: manual, multiple configurations in landscape and portrait orientations Fixes: 255307296 Change-Id: I6c241d75b393258c97f984eb6d3b2288e9af0ac5 --- .../android/systemui/qs/customize/QSCustomizer.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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 cf10c79408710..79fcc7d813721 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java +++ b/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java @@ -82,12 +82,12 @@ public class QSCustomizer extends LinearLayout { DefaultItemAnimator animator = new DefaultItemAnimator(); animator.setMoveDuration(TileAdapter.MOVE_DURATION); mRecyclerView.setItemAnimator(animator); + + updateTransparentViewHeight(); } void updateResources() { - LayoutParams lp = (LayoutParams) mTransparentView.getLayoutParams(); - lp.height = QSUtils.getQsHeaderSystemIconsAreaHeight(mContext); - mTransparentView.setLayoutParams(lp); + updateTransparentViewHeight(); mRecyclerView.getAdapter().notifyItemChanged(0); } @@ -236,4 +236,10 @@ public class QSCustomizer extends LinearLayout { public boolean isOpening() { return mOpening; } + + private void updateTransparentViewHeight() { + LayoutParams lp = (LayoutParams) mTransparentView.getLayoutParams(); + lp.height = QSUtils.getQsHeaderSystemIconsAreaHeight(mContext); + mTransparentView.setLayoutParams(lp); + } } \ No newline at end of file