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
This commit is contained in:
Fabian Kozynski
2021-09-10 10:01:40 -04:00
parent af8a2d69bc
commit 05dd5ff123

View File

@@ -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();