diff options
Diffstat (limited to 'res')
55 files changed, 242 insertions, 187 deletions
diff --git a/res/drawable-hdpi/data_grid_border.9.png b/res/drawable-hdpi/data_grid_border.9.png Binary files differindex a857fae..8d22e10 100644 --- a/res/drawable-hdpi/data_grid_border.9.png +++ b/res/drawable-hdpi/data_grid_border.9.png diff --git a/res/drawable-hdpi/data_grid_primary.9.png b/res/drawable-hdpi/data_grid_primary.9.png Binary files differdeleted file mode 100644 index 93bdc6b..0000000 --- a/res/drawable-hdpi/data_grid_primary.9.png +++ /dev/null diff --git a/res/drawable-hdpi/data_grid_secondary.9.png b/res/drawable-hdpi/data_grid_secondary.9.png Binary files differdeleted file mode 100644 index 23330d1..0000000 --- a/res/drawable-hdpi/data_grid_secondary.9.png +++ /dev/null diff --git a/res/drawable-hdpi/data_sweep_left_activated.9.png b/res/drawable-hdpi/data_sweep_left_activated.9.png Binary files differdeleted file mode 100644 index 7a18e20..0000000 --- a/res/drawable-hdpi/data_sweep_left_activated.9.png +++ /dev/null diff --git a/res/drawable-hdpi/data_sweep_left_default.9.png b/res/drawable-hdpi/data_sweep_left_default.9.png Binary files differdeleted file mode 100644 index 5088150..0000000 --- a/res/drawable-hdpi/data_sweep_left_default.9.png +++ /dev/null diff --git a/res/drawable-hdpi/data_sweep_limit_activated.9.png b/res/drawable-hdpi/data_sweep_limit_activated.9.png Binary files differindex 36be41a..598ebd3 100644 --- a/res/drawable-hdpi/data_sweep_limit_activated.9.png +++ b/res/drawable-hdpi/data_sweep_limit_activated.9.png diff --git a/res/drawable-hdpi/data_sweep_limit_default.9.png b/res/drawable-hdpi/data_sweep_limit_default.9.png Binary files differdeleted file mode 100644 index 658d1d9..0000000 --- a/res/drawable-hdpi/data_sweep_limit_default.9.png +++ /dev/null diff --git a/res/drawable-hdpi/data_sweep_right_activated.9.png b/res/drawable-hdpi/data_sweep_right_activated.9.png Binary files differdeleted file mode 100644 index 96ffbf6..0000000 --- a/res/drawable-hdpi/data_sweep_right_activated.9.png +++ /dev/null diff --git a/res/drawable-hdpi/data_sweep_right_default.9.png b/res/drawable-hdpi/data_sweep_right_default.9.png Binary files differdeleted file mode 100644 index 22831a9..0000000 --- a/res/drawable-hdpi/data_sweep_right_default.9.png +++ /dev/null diff --git a/res/drawable-hdpi/data_sweep_warning_activated.9.png b/res/drawable-hdpi/data_sweep_warning_activated.9.png Binary files differindex 83b8a65..b10dff6 100644 --- a/res/drawable-hdpi/data_sweep_warning_activated.9.png +++ b/res/drawable-hdpi/data_sweep_warning_activated.9.png diff --git a/res/drawable-hdpi/data_sweep_warning_default.9.png b/res/drawable-hdpi/data_sweep_warning_default.9.png Binary files differdeleted file mode 100644 index 3b2c1a7..0000000 --- a/res/drawable-hdpi/data_sweep_warning_default.9.png +++ /dev/null diff --git a/res/drawable-mdpi/data_grid_border.9.png b/res/drawable-mdpi/data_grid_border.9.png Binary files differindex 699c513..942f4ea 100644 --- a/res/drawable-mdpi/data_grid_border.9.png +++ b/res/drawable-mdpi/data_grid_border.9.png diff --git a/res/drawable-mdpi/data_grid_primary.9.png b/res/drawable-mdpi/data_grid_primary.9.png Binary files differdeleted file mode 100644 index 83411cf..0000000 --- a/res/drawable-mdpi/data_grid_primary.9.png +++ /dev/null diff --git a/res/drawable-mdpi/data_grid_secondary.9.png b/res/drawable-mdpi/data_grid_secondary.9.png Binary files differdeleted file mode 100644 index 23330d1..0000000 --- a/res/drawable-mdpi/data_grid_secondary.9.png +++ /dev/null diff --git a/res/drawable-mdpi/data_sweep_left_activated.9.png b/res/drawable-mdpi/data_sweep_left_activated.9.png Binary files differdeleted file mode 100644 index 10c0687..0000000 --- a/res/drawable-mdpi/data_sweep_left_activated.9.png +++ /dev/null diff --git a/res/drawable-mdpi/data_sweep_left_default.9.png b/res/drawable-mdpi/data_sweep_left_default.9.png Binary files differdeleted file mode 100644 index 397c459..0000000 --- a/res/drawable-mdpi/data_sweep_left_default.9.png +++ /dev/null diff --git a/res/drawable-mdpi/data_sweep_limit_activated.9.png b/res/drawable-mdpi/data_sweep_limit_activated.9.png Binary files differindex 924384f..f2be5ea 100644 --- a/res/drawable-mdpi/data_sweep_limit_activated.9.png +++ b/res/drawable-mdpi/data_sweep_limit_activated.9.png diff --git a/res/drawable-mdpi/data_sweep_limit_default.9.png b/res/drawable-mdpi/data_sweep_limit_default.9.png Binary files differdeleted file mode 100644 index 2b8c4cb..0000000 --- a/res/drawable-mdpi/data_sweep_limit_default.9.png +++ /dev/null diff --git a/res/drawable-mdpi/data_sweep_right_activated.9.png b/res/drawable-mdpi/data_sweep_right_activated.9.png Binary files differdeleted file mode 100644 index 5dfe594..0000000 --- a/res/drawable-mdpi/data_sweep_right_activated.9.png +++ /dev/null diff --git a/res/drawable-mdpi/data_sweep_right_default.9.png b/res/drawable-mdpi/data_sweep_right_default.9.png Binary files differdeleted file mode 100644 index 5b8e108..0000000 --- a/res/drawable-mdpi/data_sweep_right_default.9.png +++ /dev/null diff --git a/res/drawable-mdpi/data_sweep_warning_activated.9.png b/res/drawable-mdpi/data_sweep_warning_activated.9.png Binary files differindex 97f93da..cd795d2 100644 --- a/res/drawable-mdpi/data_sweep_warning_activated.9.png +++ b/res/drawable-mdpi/data_sweep_warning_activated.9.png diff --git a/res/drawable-mdpi/data_sweep_warning_default.9.png b/res/drawable-mdpi/data_sweep_warning_default.9.png Binary files differdeleted file mode 100644 index 5f65750..0000000 --- a/res/drawable-mdpi/data_sweep_warning_default.9.png +++ /dev/null diff --git a/res/drawable-xhdpi/data_grid_border.9.png b/res/drawable-xhdpi/data_grid_border.9.png Binary files differindex 7557115..6d55288 100644 --- a/res/drawable-xhdpi/data_grid_border.9.png +++ b/res/drawable-xhdpi/data_grid_border.9.png diff --git a/res/drawable-xhdpi/data_grid_primary.9.png b/res/drawable-xhdpi/data_grid_primary.9.png Binary files differdeleted file mode 100644 index ff69fd8..0000000 --- a/res/drawable-xhdpi/data_grid_primary.9.png +++ /dev/null diff --git a/res/drawable-xhdpi/data_grid_secondary.9.png b/res/drawable-xhdpi/data_grid_secondary.9.png Binary files differdeleted file mode 100644 index 09065bf..0000000 --- a/res/drawable-xhdpi/data_grid_secondary.9.png +++ /dev/null diff --git a/res/drawable-xhdpi/data_sweep_left_activated.9.png b/res/drawable-xhdpi/data_sweep_left_activated.9.png Binary files differdeleted file mode 100644 index bcd91f8..0000000 --- a/res/drawable-xhdpi/data_sweep_left_activated.9.png +++ /dev/null diff --git a/res/drawable-xhdpi/data_sweep_left_default.9.png b/res/drawable-xhdpi/data_sweep_left_default.9.png Binary files differdeleted file mode 100644 index 4abe6cd..0000000 --- a/res/drawable-xhdpi/data_sweep_left_default.9.png +++ /dev/null diff --git a/res/drawable-xhdpi/data_sweep_limit_activated.9.png b/res/drawable-xhdpi/data_sweep_limit_activated.9.png Binary files differindex 24ac571..8f1e496 100644 --- a/res/drawable-xhdpi/data_sweep_limit_activated.9.png +++ b/res/drawable-xhdpi/data_sweep_limit_activated.9.png diff --git a/res/drawable-xhdpi/data_sweep_limit_default.9.png b/res/drawable-xhdpi/data_sweep_limit_default.9.png Binary files differdeleted file mode 100644 index 9ce466a..0000000 --- a/res/drawable-xhdpi/data_sweep_limit_default.9.png +++ /dev/null diff --git a/res/drawable-xhdpi/data_sweep_right_activated.9.png b/res/drawable-xhdpi/data_sweep_right_activated.9.png Binary files differdeleted file mode 100644 index 0a3f2db..0000000 --- a/res/drawable-xhdpi/data_sweep_right_activated.9.png +++ /dev/null diff --git a/res/drawable-xhdpi/data_sweep_right_default.9.png b/res/drawable-xhdpi/data_sweep_right_default.9.png Binary files differdeleted file mode 100644 index 1f29778..0000000 --- a/res/drawable-xhdpi/data_sweep_right_default.9.png +++ /dev/null diff --git a/res/drawable-xhdpi/data_sweep_warning_activated.9.png b/res/drawable-xhdpi/data_sweep_warning_activated.9.png Binary files differindex b624228..cfc92e1 100644 --- a/res/drawable-xhdpi/data_sweep_warning_activated.9.png +++ b/res/drawable-xhdpi/data_sweep_warning_activated.9.png diff --git a/res/drawable-xhdpi/data_sweep_warning_default.9.png b/res/drawable-xhdpi/data_sweep_warning_default.9.png Binary files differdeleted file mode 100644 index b79e811..0000000 --- a/res/drawable-xhdpi/data_sweep_warning_default.9.png +++ /dev/null diff --git a/res/drawable-xxhdpi/data_grid_border.9.png b/res/drawable-xxhdpi/data_grid_border.9.png Binary files differnew file mode 100644 index 0000000..d33a7d7 --- /dev/null +++ b/res/drawable-xxhdpi/data_grid_border.9.png diff --git a/res/drawable-xxhdpi/data_sweep_limit_activated.9.png b/res/drawable-xxhdpi/data_sweep_limit_activated.9.png Binary files differnew file mode 100644 index 0000000..0457329 --- /dev/null +++ b/res/drawable-xxhdpi/data_sweep_limit_activated.9.png diff --git a/res/drawable-xxhdpi/data_sweep_warning_activated.9.png b/res/drawable-xxhdpi/data_sweep_warning_activated.9.png Binary files differnew file mode 100644 index 0000000..670bc19 --- /dev/null +++ b/res/drawable-xxhdpi/data_sweep_warning_activated.9.png diff --git a/res/drawable-xxxhdpi/data_grid_border.9.png b/res/drawable-xxxhdpi/data_grid_border.9.png Binary files differnew file mode 100644 index 0000000..4ddd222 --- /dev/null +++ b/res/drawable-xxxhdpi/data_grid_border.9.png diff --git a/res/drawable-xxxhdpi/data_sweep_limit_activated.9.png b/res/drawable-xxxhdpi/data_sweep_limit_activated.9.png Binary files differnew file mode 100644 index 0000000..3159b04 --- /dev/null +++ b/res/drawable-xxxhdpi/data_sweep_limit_activated.9.png diff --git a/res/drawable-xxxhdpi/data_sweep_warning_activated.9.png b/res/drawable-xxxhdpi/data_sweep_warning_activated.9.png Binary files differnew file mode 100644 index 0000000..c12f302 --- /dev/null +++ b/res/drawable-xxxhdpi/data_sweep_warning_activated.9.png diff --git a/res/drawable/data_sweep_limit.xml b/res/drawable/data_sweep_limit.xml index cfdbfbb..eba023f 100644 --- a/res/drawable/data_sweep_limit.xml +++ b/res/drawable/data_sweep_limit.xml @@ -14,10 +14,6 @@ limitations under the License. --> -<selector xmlns:android="http://schemas.android.com/apk/res/android" - android:enterFadeDuration="@android:integer/config_mediumAnimTime" - android:exitFadeDuration="@android:integer/config_mediumAnimTime"> - - <item android:state_activated="true" android:state_enabled="true" android:drawable="@drawable/data_sweep_limit_activated" /> - <item android:drawable="@drawable/data_sweep_limit_default" /> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:drawable="@drawable/data_sweep_limit_activated" /> </selector> diff --git a/res/drawable/data_sweep_warning.xml b/res/drawable/data_sweep_warning.xml index 8fbe8e7..5c0a1e9 100644 --- a/res/drawable/data_sweep_warning.xml +++ b/res/drawable/data_sweep_warning.xml @@ -14,10 +14,6 @@ limitations under the License. --> -<selector xmlns:android="http://schemas.android.com/apk/res/android" - android:enterFadeDuration="@android:integer/config_mediumAnimTime" - android:exitFadeDuration="@android:integer/config_mediumAnimTime"> - - <item android:state_activated="true" android:state_enabled="true" android:drawable="@drawable/data_sweep_warning_activated" /> - <item android:drawable="@drawable/data_sweep_warning_default" /> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:drawable="@drawable/data_sweep_warning_activated" /> </selector> diff --git a/res/layout/app_percentage_item.xml b/res/layout/app_percentage_item.xml index 9f5ae55..83d88e0 100644 --- a/res/layout/app_percentage_item.xml +++ b/res/layout/app_percentage_item.xml @@ -18,14 +18,14 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="?android:attr/listPreferredItemHeight" - android:paddingTop="8dip" - android:paddingBottom="8dip" + android:paddingTop="14dp" + android:paddingBottom="14dp" android:columnCount="3"> <ImageView android:id="@android:id/icon" - android:layout_width="@android:dimen/app_icon_size" - android:layout_height="@android:dimen/app_icon_size" + android:layout_width="40dp" + android:layout_height="40dp" android:layout_gravity="center" android:scaleType="fitXY" android:layout_rowSpan="3" @@ -39,21 +39,23 @@ android:layout_marginTop="2dip" android:singleLine="true" android:ellipsize="marquee" - android:textAppearance="?android:attr/textAppearanceMedium" + android:textAppearance="@android:style/TextAppearance.Material.Subhead" + android:textColor="?android:attr/textColorPrimary" android:textAlignment="viewStart" /> <TextView android:id="@android:id/text1" android:layout_marginStart="6dip" android:layout_marginTop="2dip" - android:textAppearance="?android:attr/textAppearanceSmall" /> + android:textAppearance="@android:style/TextAppearance.Material.Subhead" + android:textColor="?android:attr/textColorSecondary" /> <ProgressBar android:id="@android:id/progress" - android:layout_height="8dip" + android:layout_height="wrap_content" android:layout_columnSpan="2" android:layout_gravity="fill_horizontal|top" - android:layout_marginTop="8dip" + android:layout_marginTop="4dip" android:max="100" android:progressDrawable="@drawable/data_usage_bar" style="?android:attr/progressBarStyleHorizontal" /> diff --git a/res/layout/data_usage_app_title.xml b/res/layout/data_usage_app_title.xml index 272d8f2..2b5e26c 100644 --- a/res/layout/data_usage_app_title.xml +++ b/res/layout/data_usage_app_title.xml @@ -14,10 +14,24 @@ limitations under the License. --> -<TextView xmlns:android="http://schemas.android.com/apk/res/android" +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" - android:layout_height="wrap_content" - android:singleLine="true" - android:ellipsize="marquee" - android:textAppearance="?android:attr/textAppearanceMedium" - android:textAlignment="viewStart" /> + android:layout_height="wrap_content"> + <TextView + android:id="@+id/app_title" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:singleLine="true" + android:ellipsize="marquee" + android:textAppearance="@android:style/TextAppearance.Material.Subhead" + android:textColor="?android:attr/textColorPrimary" + android:textAlignment="viewStart" /> + <TextView + android:id="@+id/app_summary" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="@android:style/TextAppearance.Material.Body1" + android:textColor="?android:attr/textColorSecondary" + android:textAlignment="viewEnd" /> +</LinearLayout> diff --git a/res/layout/data_usage_chart.xml b/res/layout/data_usage_chart.xml index 76cfc6d..2f9d962 100644 --- a/res/layout/data_usage_chart.xml +++ b/res/layout/data_usage_chart.xml @@ -14,65 +14,48 @@ limitations under the License. --> +<!-- NOTE: this explicitly uses right/left padding, since the + graph isn't swapped in RTL languages --> <com.android.settings.widget.ChartDataUsageView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:settings="http://schemas.android.com/apk/res/com.android.settings" android:id="@+id/chart" android:layout_width="match_parent" android:layout_height="@dimen/data_usage_chart_height" - android:layout_marginStart="-16dip" - android:layout_marginEnd="-16dip" - android:layout_marginBottom="-32dip" - android:paddingStart="24dip" - android:paddingEnd="24dip" - android:paddingTop="16dip" - android:paddingBottom="48dip" - settings:optimalWidth="@dimen/data_usage_chart_optimalWidth" - settings:optimalWidthWeight="0.4"> + android:paddingLeft="?android:attr/listPreferredItemPaddingStart" + android:paddingRight="40dp" + android:paddingTop="16dp" + android:paddingBottom="24dp"> <com.android.settings.widget.ChartGridView android:id="@+id/grid" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="start|bottom" - settings:primaryDrawable="@drawable/data_grid_primary" - settings:secondaryDrawable="@drawable/data_grid_secondary" - settings:borderDrawable="@drawable/data_grid_border" - settings:labelColor="@android:color/holo_blue_light" /> + android:paddingBottom="24dp" + android:textColor="?android:attr/textColorPrimary" + android:textAppearance="@android:style/TextAppearance.Material.Caption" + settings:borderDrawable="@drawable/data_grid_border" /> <com.android.settings.widget.ChartNetworkSeriesView android:id="@+id/series" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="start|bottom" - settings:strokeColor="@android:color/holo_blue_light" - settings:fillColor="#c033b5e5" - settings:fillColorSecondary="#6633b5e5" /> + settings:strokeColor="#00000000" + settings:fillColor="#ff009688" + settings:fillColorSecondary="#ff80cbc4" + settings:safeRegion="3dp" /> <com.android.settings.widget.ChartNetworkSeriesView android:id="@+id/detail_series" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="start|bottom" - settings:strokeColor="@color/theme_accent" - settings:fillColor="#c0ba7f3e" - settings:fillColorSecondary="#60ba7f3e" /> - - <com.android.settings.widget.ChartSweepView - android:id="@+id/sweep_left" - android:layout_width="wrap_content" - android:layout_height="match_parent" - settings:sweepDrawable="@drawable/data_sweep_left" - settings:followAxis="horizontal" - settings:neighborMargin="5dip" /> - - <com.android.settings.widget.ChartSweepView - android:id="@+id/sweep_right" - android:layout_width="wrap_content" - android:layout_height="match_parent" - settings:sweepDrawable="@drawable/data_sweep_right" - settings:followAxis="horizontal" - settings:neighborMargin="5dip" /> + settings:strokeColor="#00000000" + settings:fillColor="#ff009688" + settings:fillColorSecondary="#ff009688" + settings:safeRegion="3dp" /> <com.android.settings.widget.ChartSweepView android:id="@+id/sweep_warning" @@ -84,7 +67,8 @@ settings:neighborMargin="5dip" settings:labelSize="60dip" settings:labelTemplate="@string/data_usage_sweep_warning" - settings:labelColor="#f7931d" /> + settings:labelColor="#ff37474f" + settings:safeRegion="4dp" /> <com.android.settings.widget.ChartSweepView android:id="@+id/sweep_limit" @@ -96,6 +80,7 @@ settings:neighborMargin="5dip" settings:labelSize="60dip" settings:labelTemplate="@string/data_usage_sweep_limit" - settings:labelColor="#c01a2c" /> + settings:labelColor="#fff4511e" + settings:safeRegion="4dp" /> </com.android.settings.widget.ChartDataUsageView> diff --git a/res/drawable/data_sweep_right.xml b/res/layout/data_usage_cycle_item.xml index cbe2a85..015608d 100644 --- a/res/drawable/data_sweep_right.xml +++ b/res/layout/data_usage_cycle_item.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2011 The Android Open Source Project +<!-- Copyright (C) 2014 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. @@ -14,10 +14,14 @@ limitations under the License. --> -<selector xmlns:android="http://schemas.android.com/apk/res/android" - android:enterFadeDuration="@android:integer/config_mediumAnimTime" - android:exitFadeDuration="@android:integer/config_mediumAnimTime"> - - <item android:state_activated="true" android:state_enabled="true" android:drawable="@drawable/data_sweep_right_activated" /> - <item android:drawable="@drawable/data_sweep_right_default" /> -</selector> +<TextView xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@android:id/text1" + style="?android:attr/spinnerItemStyle" + android:singleLine="true" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingStart="0dp" + android:ellipsize="marquee" + android:textAppearance="@android:style/TextAppearance.Material.Subhead" + android:textColor="?android:attr/textColorPrimary" + android:textAlignment="inherit" /> diff --git a/res/drawable/data_sweep_left.xml b/res/layout/data_usage_cycle_item_dropdown.xml index 3532cbc..a900521 100644 --- a/res/drawable/data_sweep_left.xml +++ b/res/layout/data_usage_cycle_item_dropdown.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2011 The Android Open Source Project +<!-- Copyright (C) 2014 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. @@ -14,10 +14,13 @@ limitations under the License. --> -<selector xmlns:android="http://schemas.android.com/apk/res/android" - android:enterFadeDuration="@android:integer/config_mediumAnimTime" - android:exitFadeDuration="@android:integer/config_mediumAnimTime"> - - <item android:state_activated="true" android:state_enabled="true" android:drawable="@drawable/data_sweep_left_activated" /> - <item android:drawable="@drawable/data_sweep_left_default" /> -</selector> +<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@android:id/text1" + style="?android:attr/spinnerDropDownItemStyle" + android:singleLine="true" + android:layout_width="match_parent" + android:layout_height="?android:attr/listPreferredItemHeightSmall" + android:ellipsize="marquee" + android:textAppearance="@android:style/TextAppearance.Material.Subhead" + android:textColor="?android:attr/textColorPrimary" + android:textAlignment="inherit" /> diff --git a/res/layout/data_usage_cycles.xml b/res/layout/data_usage_cycles.xml index 02aa567..45143ec 100644 --- a/res/layout/data_usage_cycles.xml +++ b/res/layout/data_usage_cycles.xml @@ -15,22 +15,30 @@ --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/cycles" android:layout_width="match_parent" - android:layout_height="40dip" - android:orientation="horizontal" - android:gravity="center_vertical"> + android:layout_height="wrap_content" + android:minHeight="?android:attr/listPreferredItemHeightSmall" + android:paddingStart="?android:attr/listPreferredItemPaddingStart" + android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" + android:orientation="horizontal"> - <TextView + <Spinner + android:id="@+id/cycles_spinner" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" - android:text="@string/data_usage_cycle" /> + android:paddingLeft="0dp" + android:textAppearance="@android:style/TextAppearance.Material.Subhead" + android:textColor="?android:attr/textColorPrimary" /> - <Spinner - android:id="@+id/cycles_spinner" - android:layout_width="0dip" + <TextView + android:id="@+id/cycle_summary" + android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_weight="1" /> + android:layout_weight="1" + android:layout_gravity="center_vertical" + android:textAppearance="@android:style/TextAppearance.Material.Subhead" + android:textColor="?android:attr/textColorPrimary" + android:textAlignment="viewEnd" /> </LinearLayout> diff --git a/res/layout/data_usage_detail.xml b/res/layout/data_usage_detail.xml index 3bca030..914e8ca 100644 --- a/res/layout/data_usage_detail.xml +++ b/res/layout/data_usage_detail.xml @@ -18,6 +18,7 @@ android:id="@+id/app_detail" android:layout_width="match_parent" android:layout_height="wrap_content" + android:paddingTop="4dp" android:orientation="vertical" android:visibility="gone"> @@ -26,82 +27,107 @@ android:layout_height="wrap_content" android:layout_marginStart="?android:attr/listPreferredItemPaddingStart" android:layout_marginEnd="?android:attr/listPreferredItemPaddingEnd" + android:layout_marginBottom="16dip" android:orientation="horizontal"> + <ImageView + android:id="@+id/app_icon" + android:layout_width="@android:dimen/app_icon_size" + android:layout_height="@android:dimen/app_icon_size" + android:layout_marginEnd="8dip" + android:scaleType="centerInside" + android:contentDescription="@null" /> + <LinearLayout android:layout_width="0dip" android:layout_height="wrap_content" android:layout_weight="1" android:layout_marginTop="8dip" - android:layout_marginEnd="8dip" android:orientation="vertical"> - <ImageView - android:id="@+id/app_icon" - android:layout_width="48dip" - android:layout_height="48dip" - android:scaleType="centerInside" - android:contentDescription="@null" /> - <LinearLayout android:id="@+id/app_titles" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="8dip" android:orientation="vertical" + android:paddingBottom="4dip" android:textAlignment="viewStart" /> - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="8dip" - android:textColor="@color/theme_accent" - android:text="@string/data_usage_label_foreground" - android:textAlignment="viewStart" /> - - <TextView - android:id="@+id/app_foreground" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textColor="@color/theme_accent" - android:textAlignment="viewStart" /> - - <TextView + <LinearLayout android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="8dip" - android:text="@string/data_usage_label_background" - android:textAlignment="viewStart" /> + android:layout_height="wrap_content"> + <TextView + android:id="@+id/app_title" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:singleLine="true" + android:ellipsize="marquee" + android:text="@string/data_usage_label_foreground" + android:textAppearance="@android:style/TextAppearance.Material.Body1" + android:textColor="?android:attr/textColorSecondary" + android:textAlignment="viewStart" /> + <TextView + android:id="@+id/app_foreground" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="@android:style/TextAppearance.Material.Body1" + android:textColor="?android:attr/textColorSecondary" + android:textAlignment="viewEnd" /> + </LinearLayout> - <TextView - android:id="@+id/app_background" + <LinearLayout android:layout_width="match_parent" - android:layout_height="wrap_content" - android:textAlignment="viewStart" /> + android:layout_height="wrap_content"> + <TextView + android:id="@+id/app_title" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:singleLine="true" + android:ellipsize="marquee" + android:text="@string/data_usage_label_background" + android:textAppearance="@android:style/TextAppearance.Material.Body1" + android:textColor="?android:attr/textColorSecondary" + android:textAlignment="viewStart" /> + <TextView + android:id="@+id/app_background" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="@android:style/TextAppearance.Material.Body1" + android:textColor="?android:attr/textColorSecondary" + android:textAlignment="viewEnd" /> + </LinearLayout> </LinearLayout> - <com.android.settings.widget.PieChartView - android:id="@+id/app_pie_chart" - android:layout_width="160dip" - android:layout_height="160dip" /> - </LinearLayout> - <Button - android:id="@+id/app_settings" + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="?android:attr/listPreferredItemPaddingStart" android:layout_marginEnd="?android:attr/listPreferredItemPaddingEnd" - android:layout_marginTop="16dip" android:layout_marginBottom="16dip" - android:text="@string/data_usage_app_settings" /> + android:orientation="horizontal"> + <Space + android:layout_width="0dp" + android:layout_height="0dp" + android:layout_weight="0.5" /> + <Button + android:id="@+id/app_settings" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="0.5" + android:text="@string/data_usage_app_settings" /> + </LinearLayout> <LinearLayout android:id="@+id/app_switches" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="vertical" /> + android:orientation="vertical" + android:showDividers="beginning|middle" + android:divider="?android:attr/listDivider" /> </LinearLayout> diff --git a/res/layout/data_usage_header.xml b/res/layout/data_usage_header.xml index bc92c34..2fcceec 100644 --- a/res/layout/data_usage_header.xml +++ b/res/layout/data_usage_header.xml @@ -19,9 +19,7 @@ android:layout_height="wrap_content" android:orientation="vertical" android:clipChildren="false" - android:clipToPadding="false" - android:paddingStart="?android:attr/listPreferredItemPaddingStart" - android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"> + android:clipToPadding="false"> <FrameLayout android:id="@+id/network_switches_container" @@ -36,29 +34,39 @@ android:divider="?android:attr/listDivider" /> </FrameLayout> - <include layout="@layout/data_usage_cycles" /> <include layout="@layout/data_usage_chart" /> <TextView - android:id="@+id/usage_summary" + android:id="@+id/disclaimer" android:layout_width="match_parent" android:layout_height="wrap_content" + android:gravity="center_vertical" + android:text="@string/data_usage_disclaimer" + android:textAppearance="@android:style/TextAppearance.Material.Body1" + android:textColor="?android:attr/textColorSecondary" android:paddingStart="?android:attr/listPreferredItemPaddingStart" android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" - android:paddingTop="8dip" - android:paddingBottom="8dip" - android:textAppearance="?android:attr/textAppearanceSmall" /> + android:paddingTop="8dp" + android:paddingBottom="0dp" /> <TextView android:id="@android:id/empty" android:layout_width="match_parent" android:layout_height="wrap_content" + android:gravity="center_vertical" android:visibility="gone" + android:text="@string/data_usage_empty" + android:textAppearance="@android:style/TextAppearance.Material.Body1" + android:textColor="?android:attr/textColorSecondary" android:paddingStart="?android:attr/listPreferredItemPaddingStart" android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" - android:paddingBottom="8dip" - android:text="@string/data_usage_empty" - android:textAppearance="?android:attr/textAppearanceSmall" /> + android:paddingTop="4dp" + android:paddingBottom="0dp" /> + + <View + android:id="@+id/stupid_padding" + android:layout_width="match_parent" + android:layout_height="8dp" /> <include layout="@layout/data_usage_detail" /> diff --git a/res/layout/preference.xml b/res/layout/preference.xml index 9645679..bfe5da4 100644 --- a/res/layout/preference.xml +++ b/res/layout/preference.xml @@ -17,23 +17,26 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" - android:minHeight="48dip" + android:minHeight="?android:attr/listPreferredItemHeightSmall" android:gravity="center_vertical" + android:paddingStart="?android:attr/listPreferredItemPaddingStart" + android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" android:background="?android:attr/selectableItemBackground"> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" - android:paddingTop="6dip" - android:paddingBottom="6dip"> + android:paddingTop="16dip" + android:paddingBottom="16dip"> <TextView android:id="@+android:id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" - android:textAppearance="?android:attr/textAppearanceMedium" + android:textAppearance="@android:style/TextAppearance.Material.Subhead" + android:textColor="?android:attr/textColorPrimary" android:ellipsize="marquee" android:fadingEdge="horizontal" /> @@ -44,9 +47,10 @@ android:layout_below="@android:id/title" android:layout_alignStart="@android:id/title" android:visibility="gone" - android:textAppearance="?android:attr/textAppearanceSmall" + android:textAlignment="viewStart" + android:textAppearance="@android:style/TextAppearance.Material.Body1" android:textColor="?android:attr/textColorSecondary" - android:maxLines="4" /> + android:maxLines="10" /> </RelativeLayout> @@ -54,7 +58,8 @@ android:id="@android:id/widget_frame" android:layout_width="wrap_content" android:layout_height="match_parent" - android:gravity="center_vertical" + android:minWidth="58dip" + android:gravity="end|center_vertical" android:orientation="vertical" /> </LinearLayout> diff --git a/res/menu/data_usage.xml b/res/menu/data_usage.xml index ea3effa..749eb16 100644 --- a/res/menu/data_usage.xml +++ b/res/menu/data_usage.xml @@ -16,33 +16,24 @@ <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item - android:id="@+id/data_usage_menu_roaming" - android:title="@string/data_usage_menu_roaming" - android:checkable="true" /> - <item android:id="@+id/data_usage_menu_restrict_background" - android:title="@string/data_usage_menu_restrict_background" - android:checkable="true" /> - <item - android:id="@+id/data_usage_menu_split_4g" - android:title="@string/data_usage_menu_split_4g" - android:checkable="true" /> - <item - android:id="@+id/data_usage_menu_auto_sync" - android:title="@string/data_usage_menu_auto_sync" - android:checkable="true" /> + android:title="@string/data_usage_menu_restrict_background" /> <item android:id="@+id/data_usage_menu_show_wifi" - android:title="@string/data_usage_menu_show_wifi" - android:checkable="true" /> + android:title="@string/data_usage_menu_show_wifi" /> <item android:id="@+id/data_usage_menu_show_ethernet" - android:title="@string/data_usage_menu_show_ethernet" - android:checkable="true" /> + android:title="@string/data_usage_menu_show_ethernet" /> <item android:id="@+id/data_usage_menu_metered" android:title="@string/data_usage_menu_metered" /> <item + android:id="@+id/data_usage_menu_sim_cards" + android:title="@string/data_usage_menu_sim_cards" /> + <item + android:id="@+id/data_usage_menu_cellular_networks" + android:title="@string/data_usage_menu_cellular_networks" /> + <item android:id="@+id/data_usage_menu_help" android:title="@string/help_label" /> </menu> diff --git a/res/values/attrs.xml b/res/values/attrs.xml index 2987de1..675df62 100644 --- a/res/values/attrs.xml +++ b/res/values/attrs.xml @@ -75,19 +75,22 @@ <attr name="labelSize" format="dimension" /> <attr name="labelTemplate" format="reference" /> <attr name="labelColor" format="color" /> + <attr name="safeRegion" format="dimension" /> </declare-styleable> <declare-styleable name="ChartGridView"> <attr name="primaryDrawable" format="reference" /> <attr name="secondaryDrawable" format="reference" /> <attr name="borderDrawable" format="reference" /> - <attr name="labelColor" /> + <attr name="android:textColor" /> + <attr name="android:textAppearance" /> </declare-styleable> <declare-styleable name="ChartNetworkSeriesView"> <attr name="strokeColor" format="color" /> <attr name="fillColor" format="color" /> <attr name="fillColorSecondary" format="color" /> + <attr name="safeRegion" /> </declare-styleable> <attr name="apnPreferenceStyle" format="reference" /> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index b7b2af0..cb0369f 100755 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -31,7 +31,7 @@ <dimen name="battery_history_chart_height">120dp</dimen> - <dimen name="data_usage_chart_height">252dip</dimen> + <dimen name="data_usage_chart_height">228dip</dimen> <dimen name="data_usage_chart_optimalWidth">440dip</dimen> <dimen name="volume_seekbar_side_margin">8dip</dimen> diff --git a/res/values/strings.xml b/res/values/strings.xml index 04794da..c645666 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -4784,20 +4784,31 @@ <string name="data_usage_data_limit">Set data limit</string> <!-- Title for option to pick visible time range from a list available usage periods. [CHAR LIMIT=25] --> <string name="data_usage_cycle">Data usage cycle</string> - <!-- Title for checkbox menu option to enable mobile data when roaming. [CHAR LIMIT=26] --> + <!-- Title for menu option to enable mobile data when roaming. [CHAR LIMIT=26] --> <string name="data_usage_menu_roaming">Data roaming</string> - <!-- Title for checkbox menu option to restrict background data usage. [CHAR LIMIT=26] --> + <!-- Title for menu option to restrict background data usage. [CHAR LIMIT=26] --> <string name="data_usage_menu_restrict_background">Restrict background data</string> - <!-- Title for checkbox menu option to show 4G mobile data usage separate from other mobile data usage. [CHAR LIMIT=26] --> + <!-- Title for menu option to allow background data usage. [CHAR LIMIT=26] --> + <string name="data_usage_menu_allow_background">Allow background data</string> + <!-- Title for menu option to show 4G mobile data usage separate from other mobile data usage. [CHAR LIMIT=26] --> <string name="data_usage_menu_split_4g">Separate 4G usage</string> - <!-- Title for checkbox menu option to show Wi-Fi data usage. [CHAR LIMIT=26] --> + <!-- Title for menu option to show Wi-Fi data usage. [CHAR LIMIT=26] --> <string name="data_usage_menu_show_wifi">Show Wi\u2011Fi</string> - <!-- Title for checkbox menu option to show Ethernet data usage. [CHAR LIMIT=26] --> + <!-- Title for menu option to hide Wi-Fi data usage. [CHAR LIMIT=26] --> + <string name="data_usage_menu_hide_wifi">Hide Wi\u2011Fi</string> + <!-- Title for menu option to show Ethernet data usage. [CHAR LIMIT=26] --> <string name="data_usage_menu_show_ethernet">Show Ethernet usage</string> + <!-- Title for menu option to hide Ethernet data usage. [CHAR LIMIT=26] --> + <string name="data_usage_menu_hide_ethernet">Hide Ethernet usage</string> <!-- Title for menu option to configure metered networks. [CHAR LIMIT=26] --> - <string name="data_usage_menu_metered">Mobile hotspots</string> - <!-- Title for menu option to enable global auto-sync of account data --> + <string name="data_usage_menu_metered">Network restrictions</string> + <!-- Title for menu option to enable global auto-sync of account data --> <string name="data_usage_menu_auto_sync">Auto-sync data</string> + <!-- Title for menu option to show details for all SIM cards. [CHAR LIMIT=26] --> + <string name="data_usage_menu_sim_cards">SIM cards</string> + <!-- Title for menu option to show details for all cellular networks. [CHAR LIMIT=26] --> + <string name="data_usage_menu_cellular_networks">Cellular networks</string> + <!-- Title for menu option to enable global auto-sync of personal account data [CHAR LIMIT=30] --> <string name="account_settings_menu_auto_sync">Auto-sync data</string> <!-- Title for menu option to enable global auto-sync of personal account data [CHAR LIMIT=30] --> @@ -4858,7 +4869,7 @@ <!-- Data Usage Background label. [CHAR LIMIT=40] --> <string name="data_usage_background_label">Background:</string> <!-- Button title for launching application-specific data usage settings. [CHAR LIMIT=32] --> - <string name="data_usage_app_settings">View app settings</string> + <string name="data_usage_app_settings">App settings</string> <!-- Checkbox label that restricts background data usage of a specific application. [CHAR LIMIT=40] --> <string name="data_usage_app_restrict_background">Restrict app background data</string> <!-- Summary message for checkbox that restricts background data usage of a specific application. [CHAR LIMIT=64] --> @@ -4930,15 +4941,18 @@ <string name="data_usage_total_during_range_mobile" product="default"><xliff:g id="range" example="Jul 1 - Jul 31">%2$s</xliff:g>: about <xliff:g id="total" example="128KB">%1$s</xliff:g> used, as measured by your phone. Your carrier\'s data usage accounting may differ.</string> <!-- Dialog title for selecting metered networks. [CHAR LIMIT=25] --> - <string name="data_usage_metered_title">Mobile hotspots</string> + <string name="data_usage_metered_title">Network restrictions</string> <!-- Dialog body for selecting paid networks. [CHAR LIMIT=NONE] --> - <string name="data_usage_metered_body">Select the Wi\u2011Fi networks which are mobile hotspots. Apps can be restricted from using these networks when in the background. Apps may also warn before using these networks for large downloads.</string> + <string name="data_usage_metered_body">Metered networks are treated like cellular when background data is restricted. Apps may warn before using these networks for large downloads.</string> <!-- Header for list of mobile networks. [CHAR LIMIT=32] --> <string name="data_usage_metered_mobile">Cellular networks</string> <!-- Header for list of Wi-Fi networks. [CHAR LIMIT=32] --> - <string name="data_usage_metered_wifi">Wi\u2011Fi networks</string> + <string name="data_usage_metered_wifi">Metered Wi\u2011Fi networks</string> <!-- Body text prompting user to enable Wi-Fi to configure metered networks. [CHAR LIMIT=64] --> - <string name="data_usage_metered_wifi_disabled">To select mobile hotspots, turn Wi\u2011Fi on.</string> + <string name="data_usage_metered_wifi_disabled">To select metered networks, turn Wi\u2011Fi on.</string> + + <!-- Disclaimer string for data usage measured by device. [CHAR LIMIT=80] --> + <string name="data_usage_disclaimer">Carrier data accounting may differ from your device.</string> <!-- Button at the bottom of the CryptKeeper screen to make an emergency call. --> <string name="cryptkeeper_emergency_call">Emergency call</string> diff --git a/res/xml/data_usage_metered_prefs.xml b/res/xml/data_usage_metered_prefs.xml index 5026a35..5915101 100644 --- a/res/xml/data_usage_metered_prefs.xml +++ b/res/xml/data_usage_metered_prefs.xml @@ -17,11 +17,6 @@ <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" android:title="@string/display_settings"> - <Preference - android:summary="@string/data_usage_metered_body" - android:persistent="false" - android:selectable="false" /> - <PreferenceCategory android:key="mobile" android:title="@string/data_usage_metered_mobile" @@ -40,4 +35,9 @@ </PreferenceCategory> + <Preference + android:summary="@string/data_usage_metered_body" + android:persistent="false" + android:selectable="false" /> + </PreferenceScreen> |