commit | 2397d60074200964d09877c067199329deac11ff | [log] [tgz] |
---|---|---|
author | Samuel Fufa <sfufa@google.com> | Tue Sep 07 12:14:32 2021 -0700 |
committer | sfufa@google.com <sfufa@google.com> | Wed Sep 15 14:40:39 2021 -0700 |
tree | 3bd8684585b3461653fdffa0f334c70b5b539896 | |
parent | 305d0463b18303a67aea26c59538c774db879e95 [diff] |
Scroll AllApps to top when new padding is set. Bug: 198212488 Test: presubmit Change-Id: I084939e3c7685531c56b1478887fd872e0e101e9
diff --git a/src/com/android/launcher3/allapps/AllAppsContainerView.java b/src/com/android/launcher3/allapps/AllAppsContainerView.java index e779ee8..e659aba 100644 --- a/src/com/android/launcher3/allapps/AllAppsContainerView.java +++ b/src/com/android/launcher3/allapps/AllAppsContainerView.java
@@ -624,6 +624,9 @@ for (int i = 0; i < mAH.length; i++) { mAH[i].padding.top = padding; mAH[i].applyPadding(); + if (mAH[i].recyclerView != null) { + mAH[i].recyclerView.scrollToTop(); + } } mHeaderTop = mHeader.getTop(); }
diff --git a/src/com/android/launcher3/allapps/FloatingHeaderRow.java b/src/com/android/launcher3/allapps/FloatingHeaderRow.java index 9bf6043..6ff2132 100644 --- a/src/com/android/launcher3/allapps/FloatingHeaderRow.java +++ b/src/com/android/launcher3/allapps/FloatingHeaderRow.java
@@ -47,6 +47,8 @@ /** * Scrolls the content vertically. + * @param scroll scrolled distance in pixels for active recyclerview. + * @param isScrolledOut bool to determine if row is scrolled out of view */ void setVerticalScroll(int scroll, boolean isScrolledOut);