diff options
author | Jon Miranda <jonmiranda@google.com> | 2019-09-16 14:44:14 -0700 |
---|---|---|
committer | Jon Miranda <jonmiranda@google.com> | 2019-09-16 16:24:59 -0700 |
commit | 6f7e9702e3124680b7eb0640898cca0a8855fbb7 (patch) | |
tree | bb94ea2dd961e5e380c21896518265dfe6612dfc /quickstep/recents_ui_overrides | |
parent | 3463d1c5f9e9b5b5014a5326fbbc812a834aadb8 (diff) | |
download | android_packages_apps_Trebuchet-6f7e9702e3124680b7eb0640898cca0a8855fbb7.tar.gz android_packages_apps_Trebuchet-6f7e9702e3124680b7eb0640898cca0a8855fbb7.tar.bz2 android_packages_apps_Trebuchet-6f7e9702e3124680b7eb0640898cca0a8855fbb7.zip |
Support defining X column layout for all apps as a display option.
Bug: 124967099
Change-Id: I7bf576759b3fa4f6ca617fbbd660541c12fd09ac
Diffstat (limited to 'quickstep/recents_ui_overrides')
2 files changed, 4 insertions, 3 deletions
diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/appprediction/PredictionAppTracker.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/appprediction/PredictionAppTracker.java index a12917f29..cc276d8ce 100644 --- a/quickstep/recents_ui_overrides/src/com/android/launcher3/appprediction/PredictionAppTracker.java +++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/appprediction/PredictionAppTracker.java @@ -128,7 +128,7 @@ public class PredictionAppTracker extends AppLaunchTracker { destroy(); // Initialize the clients - int count = InvariantDeviceProfile.INSTANCE.get(mContext).numColumns; + int count = InvariantDeviceProfile.INSTANCE.get(mContext).numAllAppsColumns; mHomeAppPredictor = createPredictor(Client.HOME, count); mRecentsOverviewPredictor = createPredictor(Client.OVERVIEW, count); return true; diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/appprediction/PredictionRowView.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/appprediction/PredictionRowView.java index 95f63cea1..23db5df2e 100644 --- a/quickstep/recents_ui_overrides/src/com/android/launcher3/appprediction/PredictionRowView.java +++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/appprediction/PredictionRowView.java @@ -93,7 +93,7 @@ public class PredictionRowView extends LinearLayout implements private final Launcher mLauncher; private final PredictionUiStateManager mPredictionUiStateManager; - private final int mNumPredictedAppsPerRow; + private int mNumPredictedAppsPerRow; // The set of predicted app component names private final List<ComponentKeyMapper> mPredictedAppComponents = new ArrayList<>(); @@ -129,7 +129,7 @@ public class PredictionRowView extends LinearLayout implements mFocusHelper = new SimpleFocusIndicatorHelper(this); - mNumPredictedAppsPerRow = LauncherAppState.getIDP(context).numColumns; + mNumPredictedAppsPerRow = LauncherAppState.getIDP(context).numAllAppsColumns; mLauncher = Launcher.getLauncher(context); mLauncher.addOnDeviceProfileChangeListener(this); @@ -227,6 +227,7 @@ public class PredictionRowView extends LinearLayout implements @Override public void onDeviceProfileChanged(DeviceProfile dp) { + mNumPredictedAppsPerRow = dp.inv.numAllAppsColumns; removeAllViews(); applyPredictionApps(); } |