Files
app_Settings/res/xml/data_usage_list.xml
Chaohui Wang 5a2f5ecff5 [DO NOT MERGE] Fix flicker for Data Usage page
Both "Mobile data usage" & "Non-carrier data usage".

By,
1. Use summary placeholder for usage amount to avoid shift
2. Before fix CycleListener's onItemSelected() is called multiple times,
   cause the app list to flash, let DataUsageList to handle the dedup
   logic to better handling.
3. Before fix if return from App Usage page, no loading view is
   displayed (only first enter has it), move this to onResume() to fix.
4. Before fix the cycles passed to App Usage page is cached (even when
   the cycles are changed), clear the cache when onResume() to fix.
5. Listener in SpinnerPreference could be null, add safety guard to it.

Fix: 187019210
Test: manual visual test
Change-Id: I95e544c46333496f4f30ed77dafa4779b4d66019
2022-05-11 17:02:54 +08:00

42 lines
1.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 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">
<PreferenceCategory
android:key="usage_amount">
<com.android.settings.datausage.ChartDataUsagePreference
android:key="chart_data" />
<Preference
android:key="operator_warning"
android:summary="@string/operator_warning"
android:selectable="false" />
<Preference
android:key="non_carrier_data_usage_warning"
android:summary="@string/non_carrier_data_usage_warning"
android:selectable="false" />
</PreferenceCategory>
<PreferenceCategory
android:key="apps_group"
android:layout="@layout/preference_category_no_label" />
</PreferenceScreen>