diff options
Diffstat (limited to 'res')
-rw-r--r-- | res/layout/data_usage_chart.xml | 11 | ||||
-rw-r--r-- | res/layout/data_usage_cycles.xml | 4 | ||||
-rw-r--r-- | res/layout/data_usage_detail.xml | 74 | ||||
-rw-r--r-- | res/layout/data_usage_header.xml | 8 | ||||
-rw-r--r-- | res/layout/data_usage_item.xml | 4 | ||||
-rw-r--r-- | res/layout/data_usage_summary.xml | 17 | ||||
-rw-r--r-- | res/layout/manage_apps_tab_content.xml | 8 | ||||
-rw-r--r-- | res/layout/preference.xml | 9 | ||||
-rw-r--r-- | res/layout/tab_indicator_thin_holo.xml | 33 | ||||
-rw-r--r-- | res/menu/data_usage.xml | 45 | ||||
-rw-r--r-- | res/values/attrs.xml | 7 | ||||
-rwxr-xr-x | res/values/dimens.xml | 4 | ||||
-rw-r--r-- | res/values/strings.xml | 8 |
13 files changed, 132 insertions, 100 deletions
diff --git a/res/layout/data_usage_chart.xml b/res/layout/data_usage_chart.xml index c1f6c27..4dae248 100644 --- a/res/layout/data_usage_chart.xml +++ b/res/layout/data_usage_chart.xml @@ -19,8 +19,13 @@ xmlns:settings="http://schemas.android.com/apk/res/com.android.settings" android:id="@+id/chart" android:layout_width="match_parent" - android:layout_height="220dip" - android:padding="16dip"> + android:layout_height="@dimen/data_usage_chart_height" + android:paddingLeft="@*android:dimen/preference_item_padding_side" + android:paddingRight="@*android:dimen/preference_item_padding_side" + android:paddingTop="16dip" + android:paddingBottom="16dip" + settings:optimalWidth="@dimen/data_usage_chart_optimalWidth" + settings:optimalWidthWeight="0.4"> <com.android.settings.widget.ChartGridView android:id="@+id/grid" @@ -48,7 +53,7 @@ android:layout_gravity="left|bottom" settings:strokeColor="#d88d3a" settings:fillColor="#c0ba7f3e" - settings:fillColorSecondary="#0000" /> + settings:fillColorSecondary="#60ba7f3e" /> <com.android.settings.widget.ChartSweepView android:id="@+id/sweep_warning" diff --git a/res/layout/data_usage_cycles.xml b/res/layout/data_usage_cycles.xml index 225fb4b..459ef6e 100644 --- a/res/layout/data_usage_cycles.xml +++ b/res/layout/data_usage_cycles.xml @@ -19,8 +19,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" - android:paddingLeft="16dip" - android:paddingRight="16dip"> + android:paddingLeft="@*android:dimen/preference_item_padding_side" + android:paddingRight="@*android:dimen/preference_item_padding_side"> <TextView android:layout_width="wrap_content" diff --git a/res/layout/data_usage_detail.xml b/res/layout/data_usage_detail.xml index 8d0c0cc..639fcf5 100644 --- a/res/layout/data_usage_detail.xml +++ b/res/layout/data_usage_detail.xml @@ -17,29 +17,75 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/app_detail" android:layout_width="match_parent" - android:layout_height="match_parent" + android:layout_height="wrap_content" android:orientation="vertical"> - <ImageView - android:id="@+id/app_icon" - android:layout_width="48dip" - android:layout_height="48dip" - android:layout_marginLeft="16dip" - android:scaleType="centerInside" /> - <LinearLayout - android:id="@+id/app_titles" android:layout_width="match_parent" - android:layout_height="match_parent" - android:layout_marginLeft="16dip" - android:layout_marginTop="8dip" - android:orientation="vertical" /> + android:layout_height="wrap_content" + android:layout_marginLeft="@*android:dimen/preference_item_padding_side" + android:layout_marginRight="@*android:dimen/preference_item_padding_side" + android:orientation="horizontal"> + + <LinearLayout + android:layout_width="0dip" + android:layout_height="wrap_content" + android:layout_weight="1" + android:layout_marginRight="@*android:dimen/preference_item_padding_inner" + android:orientation="vertical"> + + <ImageView + android:id="@+id/app_icon" + android:layout_width="48dip" + android:layout_height="48dip" + android:scaleType="centerInside" /> + + <LinearLayout + android:id="@+id/app_titles" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="8dip" + android:orientation="vertical" /> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="8dip" + android:textColor="#d88d3a" + android:text="@string/data_usage_label_foreground" /> + <TextView + android:id="@+id/app_foreground" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textColor="#d88d3a" /> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="8dip" + android:text="@string/data_usage_label_background" /> + <TextView + android:id="@+id/app_background" + android:layout_width="match_parent" + android:layout_height="wrap_content" /> + + </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" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_margin="16dip" + android:layout_marginLeft="@*android:dimen/preference_item_padding_side" + android:layout_marginRight="@*android:dimen/preference_item_padding_side" + android:layout_marginTop="16dip" + android:layout_marginBottom="16dip" android:text="@string/data_usage_app_settings" /> <LinearLayout diff --git a/res/layout/data_usage_header.xml b/res/layout/data_usage_header.xml index 528fc34..ba41c88 100644 --- a/res/layout/data_usage_header.xml +++ b/res/layout/data_usage_header.xml @@ -39,8 +39,8 @@ android:id="@+id/usage_summary" android:layout_width="match_parent" android:layout_height="wrap_content" - android:paddingLeft="16dip" - android:paddingRight="16dip" + android:paddingLeft="@*android:dimen/preference_item_padding_side" + android:paddingRight="@*android:dimen/preference_item_padding_side" android:paddingTop="8dip" android:paddingBottom="8dip" android:singleLine="true" @@ -52,8 +52,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:visibility="gone" - android:paddingLeft="16dip" - android:paddingRight="16dip" + android:paddingLeft="@*android:dimen/preference_item_padding_side" + android:paddingRight="@*android:dimen/preference_item_padding_side" android:paddingTop="8dip" android:paddingBottom="8dip" android:text="@string/data_usage_empty" diff --git a/res/layout/data_usage_item.xml b/res/layout/data_usage_item.xml index b41d486..d5c2e7f 100644 --- a/res/layout/data_usage_item.xml +++ b/res/layout/data_usage_item.xml @@ -17,8 +17,8 @@ <GridLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" - android:paddingLeft="16dip" - android:paddingRight="16dip" + android:paddingLeft="@*android:dimen/preference_item_padding_side" + android:paddingRight="@*android:dimen/preference_item_padding_side" android:paddingTop="8dip" android:paddingBottom="8dip" android:columnCount="3"> diff --git a/res/layout/data_usage_summary.xml b/res/layout/data_usage_summary.xml index 7e68143..d59e0d6 100644 --- a/res/layout/data_usage_summary.xml +++ b/res/layout/data_usage_summary.xml @@ -25,11 +25,20 @@ android:layout_height="match_parent" android:orientation="vertical"> - <TabWidget - android:id="@android:id/tabs" - android:orientation="horizontal" + <HorizontalScrollView android:layout_width="match_parent" - android:layout_height="wrap_content" /> + android:layout_height="wrap_content" + android:layout_weight="0" + android:scrollbars="none"> + + <TabWidget + android:id="@android:id/tabs" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="horizontal" + style="?android:attr/tabWidgetStyle" /> + + </HorizontalScrollView> <!-- give an empty content area to make tabhost happy --> <FrameLayout diff --git a/res/layout/manage_apps_tab_content.xml b/res/layout/manage_apps_tab_content.xml index 0391a9d..b8cee87 100644 --- a/res/layout/manage_apps_tab_content.xml +++ b/res/layout/manage_apps_tab_content.xml @@ -37,10 +37,10 @@ <TabWidget android:id="@android:id/tabs" - android:orientation="horizontal" - android:layout_width="match_parent" + android:layout_width="wrap_content" android:layout_height="wrap_content" - /> + android:orientation="horizontal" + style="?android:attr/tabWidgetStyle" /> </HorizontalScrollView> @@ -48,7 +48,7 @@ android:id="@android:id/tabcontent" android:layout_width="match_parent" android:layout_height="0dip" - android:layout_weight="1"/> + android:layout_weight="1" /> </LinearLayout> </TabHost> diff --git a/res/layout/preference.xml b/res/layout/preference.xml index 06d8f24..aef21a1 100644 --- a/res/layout/preference.xml +++ b/res/layout/preference.xml @@ -19,17 +19,16 @@ android:layout_height="wrap_content" android:minHeight="48dip" android:gravity="center_vertical" + android:paddingLeft="@*android:dimen/preference_item_padding_side" android:paddingRight="?android:attr/scrollbarSize" android:background="?android:attr/selectableItemBackground"> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="15dip" - android:layout_marginRight="6dip" - android:layout_marginTop="6dip" - android:layout_marginBottom="6dip" - android:layout_weight="1"> + android:layout_weight="1" + android:paddingTop="6dip" + android:paddingBottom="6dip"> <TextView android:id="@+android:id/title" diff --git a/res/layout/tab_indicator_thin_holo.xml b/res/layout/tab_indicator_thin_holo.xml deleted file mode 100644 index e4c4652..0000000 --- a/res/layout/tab_indicator_thin_holo.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2011 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. ---> - -<RelativeLayout - xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="0dp" - android:layout_height="48dp" - android:layout_weight="1" - android:background="@*android:drawable/tab_indicator_holo"> - - <TextView - android:id="@android:id/title" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:singleLine="true" - android:ellipsize="marquee" - android:gravity="center" - android:textAppearance="?android:attr/textAppearanceMedium" /> - -</RelativeLayout> diff --git a/res/menu/data_usage.xml b/res/menu/data_usage.xml index 24b0de4..4e938aa 100644 --- a/res/menu/data_usage.xml +++ b/res/menu/data_usage.xml @@ -16,30 +16,23 @@ <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item - android:id="@+id/action_settings" - android:icon="@drawable/ic_sysbar_quicksettings" - android:showAsAction="always"> - <menu> - <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_show_wifi" - android:title="@string/data_usage_menu_show_wifi" - android:checkable="true" /> - <item - android:id="@+id/data_usage_menu_show_ethernet" - android:title="@string/data_usage_menu_show_ethernet" - android:checkable="true" /> - </menu> - </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_show_wifi" + android:title="@string/data_usage_menu_show_wifi" + android:checkable="true" /> + <item + android:id="@+id/data_usage_menu_show_ethernet" + android:title="@string/data_usage_menu_show_ethernet" + android:checkable="true" /> </menu> diff --git a/res/values/attrs.xml b/res/values/attrs.xml index 6c63d13..684811c 100644 --- a/res/values/attrs.xml +++ b/res/values/attrs.xml @@ -50,6 +50,13 @@ <attr name="minTickWidth" format="dimension" /> </declare-styleable> + <declare-styleable name="ChartView"> + <!-- optimal width of the chart --> + <attr name="optimalWidth" format="dimension" /> + <!-- how to weight extra space beyond optimal width --> + <attr name="optimalWidthWeight" format="float" /> + </declare-styleable> + <declare-styleable name="ChartSweepView"> <attr name="sweepDrawable" format="reference" /> <attr name="followAxis"> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 5394743..4b576eb 100755 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -17,7 +17,6 @@ <resources> <dimen name="device_memory_usage_button_width">16dip</dimen> <dimen name="device_memory_usage_button_height">32dip</dimen> - <dimen name="data_usage_chart_height">220dip</dimen> <dimen name="action_bar_switch_padding">16dip</dimen> <dimen name="app_icon_size">56dip</dimen> @@ -28,4 +27,7 @@ <dimen name="content_margin_left">16dip</dimen> <dimen name="description_margin_top">26dip</dimen> <dimen name="description_margin_sides">40dip</dimen> + + <dimen name="data_usage_chart_height">220dip</dimen> + <dimen name="data_usage_chart_optimalWidth">440dip</dimen> </resources> diff --git a/res/values/strings.xml b/res/values/strings.xml index a91e6df..658e6fd 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -3392,7 +3392,7 @@ found in the list of installed applications.</string> <!-- Title for checkbox menu option to restrict background data usage. [CHAR LIMIT=32] --> <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=32] --> - <string name="data_usage_menu_split_4g">Split 4G usage</string> + <string name="data_usage_menu_split_4g">Separate 4G usage</string> <!-- Title for checkbox menu option to show Wi-Fi data usage. [CHAR LIMIT=32] --> <string name="data_usage_menu_show_wifi">Show Wi-Fi usage</string> <!-- Title for checkbox menu option to show Ethernet data usage. [CHAR LIMIT=32] --> @@ -3403,6 +3403,10 @@ found in the list of installed applications.</string> <string name="data_usage_pick_cycle_day">Day of month to reset data usage cycle:</string> <!-- Label shown when no applications used data during selected time period. [CHAR LIMIT=48] --> <string name="data_usage_empty">No applications used data during this period.</string> + <!-- Label for data usage occuring while application in foreground. [CHAR LIMIT=48] --> + <string name="data_usage_label_foreground">Foreground</string> + <!-- Label for data usage occuring while application in background. [CHAR LIMIT=48] --> + <string name="data_usage_label_background">Background</string> <!-- Checkbox label that will disable mobile network data connection when user-defined limit is reached. [CHAR LIMIT=32] --> <string name="data_usage_disable_mobile_limit">Disable mobile data at limit</string> @@ -3471,7 +3475,7 @@ found in the list of installed applications.</string> <!-- Combination of total network bytes sent and received by an application. [CHAR LIMIT=NONE] --> <string name="data_usage_received_sent"><xliff:g id="received" example="128KB">%1$s</xliff:g> received, <xliff:g id="sent" example="1.3GB">%2$s</xliff:g> sent</string> <!-- Label displaying total network data transferred during a specific time period. [CHAR LIMIT=64] --> - <string name="data_usage_total_during_range">Data usage: <xliff:g id="total" example="128KB">%1$s</xliff:g> on <xliff:g id="range" example="Jul 1 - Jul 31">%2$s</xliff:g></string> + <string name="data_usage_total_during_range"><xliff:g id="range" example="Jul 1 - Jul 31">%2$s</xliff:g>: <xliff:g id="total" example="128KB">%1$s</xliff:g> used</string> <!-- Button at the bottom of the CryptKeeper screen to make an emergency call. --> <string name="cryptkeeper_emergency_call">Emergency call</string> |