mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
Optimize updating All Apps Predictions.
* Prefetch existing predictions in onResume. * Only update predictions if something has been changed. * Swap predictions in place (if possible) -- this avoids having to relayout all of All Apps when just the predictions change. Bug: 64126588 Bug: 63711551 Change-Id: Iffa0d9d7d6f99f606dd68b7df5893d6eba1574f5
This commit is contained in:
@@ -224,6 +224,8 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
|
||||
mAppsRecyclerView.setLayoutManager(mLayoutManager);
|
||||
mAppsRecyclerView.setAdapter(mAdapter);
|
||||
mAppsRecyclerView.setHasFixedSize(true);
|
||||
// Removes the animation that can occur when updating the predicted apps in place.
|
||||
mAppsRecyclerView.getItemAnimator().setChangeDuration(0);
|
||||
if (FeatureFlags.LAUNCHER3_PHYSICS) {
|
||||
mAppsRecyclerView.setSpringAnimationHandler(mSpringAnimationHandler);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user