Update data usage UX
Update the UX and dig the data usage screen out of a huge whole of technical debt. Switch every to use Preferences rather than standard layouts and ListViews. Split data usage into several fragments, all separated. DataUsageSummary: - Shows a summary of the 'default' usage at the top, this will be the default sim on phones, or wifi if it has it, or ethernet as last attempt to show something. - Also has individual categories for each network type that has data, cell, wifi, and ethernet. Maybe should look into bt though? DataUsageList: - Takes a NetworkTemplate as an input, and can only be reached from the network specific categories in DataUsageSummary - Shows a graph of current usage for that network and links to app detail page for any app. - Has gear link to quick get to billing cycle screen if available BillingCycleSettings: - Just a screen with the cycle day and warning/limits separated out from the data usage. AppDataUsage: - App specific data usage details - May need some UX iteration given lack of clarity in the spec Bug: 22459566 Change-Id: I0222d8d7ea7b75a9775207a6026ebbdcce8f5e46
This commit is contained in:
57
res/xml/app_data_usage.xml
Normal file
57
res/xml/app_data_usage.xml
Normal file
@@ -0,0 +1,57 @@
|
||||
<?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"
|
||||
android:title="@string/data_usage_summary_title">
|
||||
|
||||
<com.android.settings.applications.SpacePreference
|
||||
android:layout_height="8dp" />
|
||||
|
||||
<Preference
|
||||
android:key="total_usage"
|
||||
android:title="@string/total_size_label"
|
||||
android:selectable="false"
|
||||
android:layout="@layout/horizontal_preference" />
|
||||
|
||||
<Preference
|
||||
android:key="foreground_usage"
|
||||
android:title="@string/data_usage_label_foreground"
|
||||
android:selectable="false"
|
||||
android:layout="@layout/horizontal_preference" />
|
||||
|
||||
<Preference
|
||||
android:key="background_usage"
|
||||
android:title="@string/data_usage_label_background"
|
||||
android:selectable="false"
|
||||
android:layout="@layout/horizontal_preference" />
|
||||
|
||||
<com.android.settings.applications.SpacePreference
|
||||
android:layout_height="8dp" />
|
||||
|
||||
<Preference
|
||||
android:key="app_settings"
|
||||
android:title="@string/data_usage_app_settings" />
|
||||
|
||||
<SwitchPreference
|
||||
android:key="restrict_background"
|
||||
android:title="@string/data_usage_app_restrict_background"
|
||||
android:summary="@string/data_usage_app_restrict_background_summary" />
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="app_list"
|
||||
android:title="@string/data_usage_other_apps" />
|
||||
|
||||
</PreferenceScreen>
|
||||
@@ -18,11 +18,15 @@
|
||||
android:title="@string/memory_usage">
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/average_memory_use" />
|
||||
android:title="@string/average_memory_use"
|
||||
android:layout="@layout/preference_category_short" />
|
||||
|
||||
<com.android.settings.applications.LayoutPreference
|
||||
<com.android.settings.SummaryPreference
|
||||
android:key="status_header"
|
||||
android:layout="@layout/proc_stats_ui" />
|
||||
android:selectable="false" />
|
||||
|
||||
<com.android.settings.applications.SpacePreference
|
||||
android:layout_height="5dp" />
|
||||
|
||||
<Preference
|
||||
android:key="frequency"
|
||||
|
||||
36
res/xml/billing_cycle.xml
Normal file
36
res/xml/billing_cycle.xml
Normal file
@@ -0,0 +1,36 @@
|
||||
<?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"
|
||||
android:title="@string/data_usage_summary_title">
|
||||
|
||||
<Preference
|
||||
android:key="billing_cycle"
|
||||
android:title="@string/billing_cycle" />
|
||||
|
||||
<Preference
|
||||
android:key="data_warning"
|
||||
android:title="@string/data_warning" />
|
||||
|
||||
<SwitchPreference
|
||||
android:key="set_data_limit"
|
||||
android:title="@string/set_data_limit" />
|
||||
|
||||
<Preference
|
||||
android:key="data_limit"
|
||||
android:title="@string/data_limit" />
|
||||
|
||||
</PreferenceScreen>
|
||||
38
res/xml/data_usage.xml
Normal file
38
res/xml/data_usage.xml
Normal file
@@ -0,0 +1,38 @@
|
||||
<?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"
|
||||
android:title="@string/data_usage_summary_title">
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/usage"
|
||||
android:layout="@layout/preference_category_short">
|
||||
|
||||
<com.android.settings.SummaryPreference
|
||||
android:key="status_header"
|
||||
android:selectable="false" />
|
||||
|
||||
<Preference
|
||||
android:key="limit_summary"
|
||||
android:selectable="false" />
|
||||
|
||||
<com.android.settings.datausage.RestrictBackgroundDataPreference
|
||||
android:key="restrict_background"
|
||||
android:title="@string/data_usage_menu_restrict_background" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
||||
38
res/xml/data_usage_cellular.xml
Normal file
38
res/xml/data_usage_cellular.xml
Normal file
@@ -0,0 +1,38 @@
|
||||
<?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">
|
||||
|
||||
<com.android.settings.datausage.TemplatePreferenceCategory
|
||||
android:key="mobile_category"
|
||||
android:title="@string/data_usage_tab_mobile">
|
||||
|
||||
<com.android.settings.datausage.CellDataPreference
|
||||
android:key="data_usage_enable"
|
||||
android:title="@string/data_usage_enable_mobile" />
|
||||
|
||||
<com.android.settings.datausage.DataUsagePreference
|
||||
android:key="cellular_data_usage"
|
||||
android:title="@string/cellular_data_usage" />
|
||||
|
||||
<com.android.settings.datausage.BillingCyclePreference
|
||||
android:key="billing_preference"
|
||||
android:title="@string/billing_cycle" />
|
||||
|
||||
</com.android.settings.datausage.TemplatePreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
||||
30
res/xml/data_usage_ethernet.xml
Normal file
30
res/xml/data_usage_ethernet.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?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">
|
||||
|
||||
<com.android.settings.datausage.TemplatePreferenceCategory
|
||||
android:key="ethernet_category"
|
||||
android:title="@string/ethernet">
|
||||
|
||||
<com.android.settings.datausage.DataUsagePreference
|
||||
android:key="ethernet_data_usage"
|
||||
android:title="@string/ethernet_data_usage" />
|
||||
|
||||
</com.android.settings.datausage.TemplatePreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
||||
37
res/xml/data_usage_list.xml
Normal file
37
res/xml/data_usage_list.xml
Normal file
@@ -0,0 +1,37 @@
|
||||
<?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"
|
||||
android:title="@string/data_usage_summary_title">
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="usage_amount"
|
||||
android:layout="@layout/preference_category_short">
|
||||
|
||||
<com.android.settings.datausage.ChartDataUsagePreference
|
||||
android:key="chart_data" />
|
||||
|
||||
<Preference
|
||||
android:summary="@string/operator_warning"
|
||||
android:selectable="false" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="apps_group"
|
||||
android:layout="@layout/preference_category_no_label" />
|
||||
|
||||
</PreferenceScreen>
|
||||
35
res/xml/data_usage_wifi.xml
Normal file
35
res/xml/data_usage_wifi.xml
Normal file
@@ -0,0 +1,35 @@
|
||||
<?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">
|
||||
|
||||
<com.android.settings.datausage.TemplatePreferenceCategory
|
||||
android:key="wifi_category"
|
||||
android:title="@string/wifi">
|
||||
|
||||
<com.android.settings.datausage.DataUsagePreference
|
||||
android:key="wifi_data_usage"
|
||||
android:title="@string/wifi_data_usage" />
|
||||
|
||||
<com.android.settings.datausage.NetworkRestrictionsPreference
|
||||
android:key="network_restrictions"
|
||||
android:title="@string/network_restrictions"
|
||||
android:fragment="com.android.settings.datausage.DataUsageMeteredSettings" />
|
||||
|
||||
</com.android.settings.datausage.TemplatePreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
||||
@@ -18,13 +18,17 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:title="@string/app_memory_use"
|
||||
android:key="app_list">
|
||||
<PreferenceCategory
|
||||
android:title="@string/average_memory_use" />
|
||||
|
||||
<com.android.settings.applications.LayoutPreference
|
||||
<PreferenceCategory
|
||||
android:title="@string/average_memory_use"
|
||||
android:layout="@layout/preference_category_short" />
|
||||
|
||||
<com.android.settings.SummaryPreference
|
||||
android:key="status_header"
|
||||
android:selectable="false"
|
||||
android:layout="@layout/proc_stats_ui" />
|
||||
android:selectable="false" />
|
||||
|
||||
<com.android.settings.applications.SpacePreference
|
||||
android:layout_height="5dp" />
|
||||
|
||||
<Preference
|
||||
android:key="performance"
|
||||
|
||||
Reference in New Issue
Block a user