Merge "Fix the overlap issue of MainSwitch and list view." into sc-dev

This commit is contained in:
Stanley Wang
2021-03-04 11:44:38 +00:00
committed by Android (Google) Code Review
2 changed files with 1 additions and 2 deletions

View File

@@ -309,6 +309,7 @@ public class SettingsActivity extends SettingsBaseActivity
mMainSwitch = findViewById(R.id.switch_bar);
if (mMainSwitch != null) {
mMainSwitch.setMetricsTag(getMetricsTag());
mMainSwitch.setTranslationZ(findViewById(R.id.main_content).getTranslationZ() + 1);
}
// see if we should show Back/Next buttons

View File

@@ -200,8 +200,6 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra
mSwitchBar = ((SettingsActivity) getActivity()).getSwitchBar();
mSwitchBar.setTitle(getContext().getString(R.string.developer_options_main_switch_title));
mSwitchBar.show();
mSwitchBar.setTranslationZ(
getActivity().findViewById(R.id.main_content).getTranslationZ() + 1);
mSwitchBarController = new DevelopmentSwitchBarController(
this /* DevelopmentSettings */, mSwitchBar, mIsAvailable,
getSettingsLifecycle());