Fix calculation of all apps recyclerview pool size of app icons
grid.numShownAllAppsColumns is the column size of all apps, whereas mNumAppsPerRow is the column size of workspace, we should use the former one to calculate num of all apps icons Bug: 287523421 Flag: N/A Test: Open all apps from launcher and taskbar and scroll it, Expect scorlling works without jank. Change-Id: Ife488e5853c84f6cc94e1e9e7edae67844275439
This commit is contained in:
1 parent
16b05e251b
commit
1acda93e26
1 file changed
+2
-2
@@ -96,8 +96,8 @@ public class AllAppsRecyclerView extends FastScrollRecyclerView {
|
||||
int approxRows = (int) Math.ceil(grid.availableHeightPx / grid.allAppsIconSizePx);
|
||||
pool.setMaxRecycledViews(AllAppsGridAdapter.VIEW_TYPE_EMPTY_SEARCH, 1);
|
||||
pool.setMaxRecycledViews(AllAppsGridAdapter.VIEW_TYPE_ALL_APPS_DIVIDER, 1);
|
||||
pool.setMaxRecycledViews(AllAppsGridAdapter.VIEW_TYPE_ICON, approxRows
|
||||
* (mNumAppsPerRow + 1));
|
||||
pool.setMaxRecycledViews(
|
||||
AllAppsGridAdapter.VIEW_TYPE_ICON, (approxRows + 1) * grid.numShownAllAppsColumns);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user