From b686972b7db170c4bd7b6c8b107c3dbdddb8755f Mon Sep 17 00:00:00 2001 From: Steven Ng Date: Wed, 17 Feb 2021 11:40:07 +0000 Subject: [PATCH] Extract common codes for personal / work profile tabs These codes can be reused in the FullWidgetsSheet which we will be adding tabs for personal / work profile. Test: Set up work profile and then switch person / work profile tabs in the AllAppsContainerView. Bug: 179797520 Change-Id: Ib7eb1190e1384a664cbe3e34411c9362f1f6db03 --- res/layout/all_apps.xml | 30 +----- res/layout/personal_work_tabs.xml | 47 ++++++++++ res/layout/secondary_launcher.xml | 4 +- .../allapps/AllAppsContainerView.java | 18 ++-- .../launcher3/allapps/AllAppsPagedView.java | 60 ++---------- .../allapps/LauncherAllAppsContainerView.java | 9 +- .../workprofile/PersonalWorkPagedView.java | 92 +++++++++++++++++++ .../PersonalWorkSlidingTabStrip.java | 25 +++-- 8 files changed, 178 insertions(+), 107 deletions(-) create mode 100644 res/layout/personal_work_tabs.xml create mode 100644 src/com/android/launcher3/workprofile/PersonalWorkPagedView.java rename src/com/android/launcher3/{allapps => workprofile}/PersonalWorkSlidingTabStrip.java (85%) diff --git a/res/layout/all_apps.xml b/res/layout/all_apps.xml index 0041c9a7c8..8ed16c7493 100644 --- a/res/layout/all_apps.xml +++ b/res/layout/all_apps.xml @@ -40,35 +40,7 @@ - - -