From d072e8501ace9be6f32565226960549c86ca0d5a Mon Sep 17 00:00:00 2001 From: Mill Chen Date: Thu, 4 Feb 2021 18:53:44 +0800 Subject: [PATCH] Restructure app info page When the collapsing toolbar is applied in the Settings app, some pages they used manage_applications_apps will have the collapsing toolbar not work properly. This was caused by using multiple CoordinatorLayout and AppBarLayout in these pages. Bug: 177375909 Test: visual verified Change-Id: Ibfeeab9cf907a23d18ee1ec2c450c523316cfc92 --- res/layout/manage_applications_apps_v2.xml | 63 +++++++++++++++++++ .../ManageApplications.java | 6 +- 2 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 res/layout/manage_applications_apps_v2.xml diff --git a/res/layout/manage_applications_apps_v2.xml b/res/layout/manage_applications_apps_v2.xml new file mode 100644 index 00000000000..ecc764a9217 --- /dev/null +++ b/res/layout/manage_applications_apps_v2.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/com/android/settings/applications/manageapplications/ManageApplications.java b/src/com/android/settings/applications/manageapplications/ManageApplications.java index c699425e0ae..707e6f44a1a 100644 --- a/src/com/android/settings/applications/manageapplications/ManageApplications.java +++ b/src/com/android/settings/applications/manageapplications/ManageApplications.java @@ -398,7 +398,11 @@ public class ManageApplications extends InstrumentedFragment return mRootView; } - mRootView = inflater.inflate(R.layout.manage_applications_apps, null); + if (FeatureFlagUtils.isEnabled(getContext(), FeatureFlags.SILKY_HOME)) { + mRootView = inflater.inflate(R.layout.manage_applications_apps_v2, null); + } else { + mRootView = inflater.inflate(R.layout.manage_applications_apps, null); + } mLoadingContainer = mRootView.findViewById(R.id.loading_container); mListContainer = mRootView.findViewById(R.id.list_container); if (mListContainer != null) {