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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user