Files
app_Settings/res/xml/accounts_dashboard_settings_header.xml
Mill Chen 28bc1c04b9 Fix the background color of CollapsingToolbarLayout
The wrong background color of CollapsingToolbarLayout appears in some
pages like "All apps" page or "Password and accounts" page. This symptom
can be observed in these pages when the work profile is enabled and the
line count of title is 1.

This issue is caused by updating the title of the page many times. In
these pages that have the tab view, the structure of the page differs
from a general setting page. The title of the page is coming from
BaseActivity, ProfileSelectFragment, PersonalFragment and WorkFragment,
in which the page that has the issue has an empty string from
ProfileSelectFragment. That is causing the CollapsingTollbarLayout has
the different line count during the process of setting the title.

Since the pages that have the tab view are different from the general
pages in Settings, the title should be set separately for those pages.
Adding a method to get the title resource ID so the page extending from
ProfileSelectFragment can set its title.

Bug: 192914660
Test: visual test and manual test
1) Enable work profile
2) Navigate to All apps page
3) The page should have the correct background color in the
CollapsingToolbarLayout

Change-Id: I52ef9729f3cad56161ea3d87ba25429dfcdb26ef
2021-12-01 18:44:42 +08:00

23 lines
918 B
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res-auto"
android:title="@string/account_dashboard_title"
settings:searchable="false">
</PreferenceScreen>