From 9d7f2b9e0d2b40414951f3dba461c6cabc9c7cbf Mon Sep 17 00:00:00 2001 From: Jon Miranda Date: Mon, 5 Jun 2017 14:25:58 -0700 Subject: [PATCH] Decrease jank in all apps physics. By creating the spring in onCreateViewHolder and adding in onBindViewHolder, we are able to take advantage of RecyclerView's prefetching optimizations. Bug: 38349031 Change-Id: Ie445039fd90ca92ae4ce1ff71c57b15f662377a8 --- .../launcher3/allapps/AllAppsGridAdapter.java | 48 ++++++++++++------- .../anim/SpringAnimationHandler.java | 2 +- 2 files changed, 32 insertions(+), 18 deletions(-) diff --git a/src/com/android/launcher3/allapps/AllAppsGridAdapter.java b/src/com/android/launcher3/allapps/AllAppsGridAdapter.java index d3d23ca249..83c1370140 100644 --- a/src/com/android/launcher3/allapps/AllAppsGridAdapter.java +++ b/src/com/android/launcher3/allapps/AllAppsGridAdapter.java @@ -102,7 +102,12 @@ public class AllAppsGridAdapter extends RecyclerView.Adapter