From 3f28e0686d55ae0f698aab16ee7970f5e7a8a78a Mon Sep 17 00:00:00 2001 From: Jon Miranda Date: Tue, 23 Mar 2021 17:29:31 -0400 Subject: [PATCH] Update All Apps apps per row when DeviceProfile changes. This fixes the bug where # all apps columns does not change as expected during a grid change. Bug: 183534910 Test: manual, visual Change-Id: Id6a6abd3c7c5e9f36be96eef92961ecfdd477ac9 --- src/com/android/launcher3/allapps/AllAppsContainerView.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/com/android/launcher3/allapps/AllAppsContainerView.java b/src/com/android/launcher3/allapps/AllAppsContainerView.java index 591de043d2..9813bca8a1 100644 --- a/src/com/android/launcher3/allapps/AllAppsContainerView.java +++ b/src/com/android/launcher3/allapps/AllAppsContainerView.java @@ -180,6 +180,7 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo @Override public void onDeviceProfileChanged(DeviceProfile dp) { for (AdapterHolder holder : mAH) { + holder.adapter.setAppsPerRow(dp.inv.numAllAppsColumns); if (holder.recyclerView != null) { // Remove all views and clear the pool, while keeping the data same. After this // call, all the viewHolders will be recreated.