Merge "Change expand animation for private space container." into main
diff --git a/src/com/android/launcher3/FastScrollRecyclerView.java b/src/com/android/launcher3/FastScrollRecyclerView.java
index a13dcc1..7ec0a89 100644
--- a/src/com/android/launcher3/FastScrollRecyclerView.java
+++ b/src/com/android/launcher3/FastScrollRecyclerView.java
@@ -197,11 +197,11 @@
/**
* Scrolls this recycler view to the bottom with easing and duration.
*/
- public void scrollToBottomWithMotion() {
+ public void scrollToBottomWithMotion(int duration) {
if (mScrollbar != null) {
mScrollbar.reattachThumbToScroll();
}
// Emphasized interpolators with 500ms duration
- smoothScrollBy(0, getAvailableScrollHeight(), Interpolators.EMPHASIZED, 500);
+ smoothScrollBy(0, getAvailableScrollHeight(), Interpolators.EMPHASIZED, duration);
}
}
diff --git a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java
index 55438fe..930196d 100644
--- a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java
+++ b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java
@@ -126,6 +126,7 @@
public static final float PULL_MULTIPLIER = .02f;
public static final float FLING_VELOCITY_MULTIPLIER = 1200f;
protected static final String BUNDLE_KEY_CURRENT_PAGE = "launcher.allapps.current_page";
+ private static final int SCROLL_TO_BOTTOM_DURATION = 500;
private static final long DEFAULT_SEARCH_TRANSITION_DURATION_MS = 300;
// Render the header protection at all times to debug clipping issues.
private static final boolean DEBUG_HEADER_PROTECTION = false;
@@ -515,7 +516,7 @@
// Switch to the main tab
switchToTab(ActivityAllAppsContainerView.AdapterHolder.MAIN);
// Scroll to bottom
- getActiveRecyclerView().scrollToBottomWithMotion();
+ getActiveRecyclerView().scrollToBottomWithMotion(SCROLL_TO_BOTTOM_DURATION);
});
}
diff --git a/src/com/android/launcher3/allapps/PrivateSpaceHeaderViewController.java b/src/com/android/launcher3/allapps/PrivateSpaceHeaderViewController.java
index bc3269d..bc55597 100644
--- a/src/com/android/launcher3/allapps/PrivateSpaceHeaderViewController.java
+++ b/src/com/android/launcher3/allapps/PrivateSpaceHeaderViewController.java
@@ -120,11 +120,7 @@
(ActivityAllAppsContainerView<?>.AdapterHolder) mAllApps.mAH.get(MAIN);
if (Flags.enablePrivateSpace() && Flags.privateSpaceAnimation()
&& mAllApps.getActiveRecyclerView() == mainAdapterHolder.mRecyclerView) {
- RecyclerViewAnimationController recyclerViewAnimationController =
- new RecyclerViewAnimationController(mAllApps);
- recyclerViewAnimationController.animateToState(true /* expand */,
- ANIMATION_DURATION, () -> {});
- mAllApps.getActiveRecyclerView().scrollToBottomWithMotion();
+ mAllApps.getActiveRecyclerView().scrollToBottomWithMotion(ANIMATION_DURATION);
}
}