From 05dd5ff123fa8717c414a1adb84df991c4b46165 Mon Sep 17 00:00:00 2001 From: Fabian Kozynski Date: Fri, 10 Sep 2021 10:01:40 -0400 Subject: [PATCH] Scroll to beginning when showing QSCustomizer Make sure that it's scrolled to the top right before showing. Test: manual Fixes: 199040800 Change-Id: If9b0008f260e9596cf2d3cea907e685a3349e1aa --- .../src/com/android/systemui/qs/customize/QSCustomizer.java | 2 ++ 1 file changed, 2 insertions(+) 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 d33982c6e1725..e6ab4363680d6 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java +++ b/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java @@ -116,6 +116,7 @@ public class QSCustomizer extends LinearLayout { */ void show(int x, int y, TileAdapter tileAdapter) { if (!isShown) { + mRecyclerView.getLayoutManager().scrollToPosition(0); int[] containerLocation = findViewById(R.id.customize_container).getLocationOnScreen(); mX = x - containerLocation[0]; mY = y - containerLocation[1]; @@ -131,6 +132,7 @@ public class QSCustomizer extends LinearLayout { void showImmediately() { if (!isShown) { + mRecyclerView.getLayoutManager().scrollToPosition(0); setVisibility(VISIBLE); mClipper.cancelAnimator(); mClipper.showBackground();