summaryrefslogtreecommitdiffstats
path: root/res/layout
diff options
context:
space:
mode:
Diffstat (limited to 'res/layout')
-rw-r--r--res/layout/app_percentage_item.xml18
-rw-r--r--res/layout/data_usage_app_title.xml26
-rw-r--r--res/layout/data_usage_chart.xml59
-rw-r--r--res/layout/data_usage_cycle_item.xml27
-rw-r--r--res/layout/data_usage_cycle_item_dropdown.xml26
-rw-r--r--res/layout/data_usage_cycles.xml28
-rw-r--r--res/layout/data_usage_detail.xml112
-rw-r--r--res/layout/data_usage_header.xml30
-rw-r--r--res/layout/preference.xml19
9 files changed, 223 insertions, 122 deletions
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/layout/data_usage_cycle_item.xml b/res/layout/data_usage_cycle_item.xml
new file mode 100644
index 0000000..015608d
--- /dev/null
+++ b/res/layout/data_usage_cycle_item.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+ 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.
+-->
+
+<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/layout/data_usage_cycle_item_dropdown.xml b/res/layout/data_usage_cycle_item_dropdown.xml
new file mode 100644
index 0000000..a900521
--- /dev/null
+++ b/res/layout/data_usage_cycle_item_dropdown.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+ 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.
+-->
+
+<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>