summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorJason Monk <jmonk@google.com>2015-06-16 13:17:01 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-06-16 13:17:02 +0000
commit744f2adb56ac0077a103c8e6e3b20f421eddc780 (patch)
tree7b67b635bf631748316ea76025d8f760c97843e7 /res
parent9a5550e9e6efe211b03d067eae2689f6ef5eb2d1 (diff)
parent2cdafc6be386bb767404e42fc728a1a810aa896a (diff)
downloadpackages_apps_Settings-744f2adb56ac0077a103c8e6e3b20f421eddc780.zip
packages_apps_Settings-744f2adb56ac0077a103c8e6e3b20f421eddc780.tar.gz
packages_apps_Settings-744f2adb56ac0077a103c8e6e3b20f421eddc780.tar.bz2
Merge "Layout refinement for app lists" into mnc-dev
Diffstat (limited to 'res')
-rw-r--r--res/layout/app_item.xml (renamed from res/layout/app_percentage_item.xml)36
-rwxr-xr-xres/layout/app_item_linear_color.xml79
-rw-r--r--res/layout/app_ops_details.xml2
-rw-r--r--res/layout/data_usage_item.xml2
-rw-r--r--res/layout/installed_app_details.xml2
-rwxr-xr-xres/layout/manage_applications_item.xml85
-rw-r--r--res/layout/preference_app.xml (renamed from res/layout/preference_app_percentage.xml)2
-rw-r--r--res/layout/preference_material_settings.xml80
-rw-r--r--res/layout/widget_progress_bar.xml23
-rw-r--r--res/layout/widget_text_views.xml49
-rw-r--r--res/values/styles.xml6
-rw-r--r--res/values/themes.xml1
12 files changed, 174 insertions, 193 deletions
diff --git a/res/layout/app_percentage_item.xml b/res/layout/app_item.xml
index 64146d9..26f2b1e 100644
--- a/res/layout/app_percentage_item.xml
+++ b/res/layout/app_item.xml
@@ -17,19 +17,19 @@
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:minHeight="?android:attr/listPreferredItemHeight"
- android:paddingTop="14dp"
- android:paddingBottom="14dp"
+ android:minHeight="72dp"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp"
android:columnCount="3">
<ImageView
android:id="@android:id/icon"
- android:layout_width="40dp"
- android:layout_height="40dp"
+ android:layout_width="@dimen/app_icon_size"
+ android:layout_height="@dimen/app_icon_size"
android:layout_gravity="center"
android:scaleType="fitXY"
android:layout_rowSpan="3"
- android:layout_marginEnd="8dip"
+ android:layout_marginEnd="16dip"
android:contentDescription="@null" />
<TextView
@@ -44,30 +44,18 @@
android:textAlignment="viewStart" />
<TextView
- android:id="@android:id/text1"
+ android:id="@android:id/summary"
android:layout_marginStart="6dip"
android:layout_marginTop="2dip"
+ android:singleLine="true"
+ android:ellipsize="marquee"
android:textAppearance="@android:style/TextAppearance.Material.Subhead"
android:textColor="?android:attr/textColorSecondary" />
- <ProgressBar
- android:id="@android:id/progress"
+ <FrameLayout
+ android:id="@android:id/widget_frame"
android:layout_height="wrap_content"
android:layout_columnSpan="2"
- android:layout_gravity="fill_horizontal|top"
- android:layout_marginTop="4dip"
- android:max="100"
- android:progressBackgroundTint="@android:color/transparent"
- style="?android:attr/progressBarStyleHorizontal" />
-
- <TextView
- android:id="@android:id/summary"
- android:layout_width="0dip"
- android:layout_gravity="fill_horizontal|top"
- android:layout_columnSpan="2"
- android:layout_marginTop="6dip"
- android:visibility="gone"
- android:maxLines="2"
- android:textAppearance="?android:attr/textAppearanceSmall" />
+ android:layout_gravity="fill_horizontal|top" />
</GridLayout>
diff --git a/res/layout/app_item_linear_color.xml b/res/layout/app_item_linear_color.xml
deleted file mode 100755
index 7a4aad5..0000000
--- a/res/layout/app_item_linear_color.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2015 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="match_parent"
- android:layout_height="wrap_content"
- android:minHeight="?android:attr/listPreferredItemHeight"
- android:paddingStart="?android:attr/listPreferredItemPaddingStart"
- android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
- android:paddingTop="8dip"
- android:paddingBottom="8dip">
-
- <ImageView
- android:id="@android:id/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"
- android:duplicateParentState="true" />
-
- <LinearLayout
- android:id="@+id/text_area"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:layout_toEndOf="@android:id/icon"
- android:orientation="horizontal"
- android:duplicateParentState="true">
-
- <TextView
- android:id="@android:id/title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:layout_marginTop="2dip"
- android:singleLine="true"
- android:ellipsize="marquee"
- android:textAppearance="@android:style/TextAppearance.Material.Subhead"
- android:textAlignment="viewStart"
- android:duplicateParentState="true" />
-
- <TextView
- android:id="@android:id/summary"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:textAppearance="@android:style/TextAppearance.Material.Body1"
- android:textColor="?android:attr/textColorSecondary"
- android:gravity="end|bottom"
- android:duplicateParentState="true" />
-
- </LinearLayout>
-
- <com.android.settings.applications.LinearColorBar
- android:id="@+id/linear_color_bar"
- android:layout_width="match_parent"
- android:layout_height="10dp"
- android:layout_marginTop="7dp"
- android:layout_marginBottom="5dp"
- android:layout_toEndOf="@android:id/icon"
- android:layout_below="@id/text_area"
- android:duplicateParentState="true" />
-
-</RelativeLayout>
diff --git a/res/layout/app_ops_details.xml b/res/layout/app_ops_details.xml
index e3209ca..fc3c1de 100644
--- a/res/layout/app_ops_details.xml
+++ b/res/layout/app_ops_details.xml
@@ -41,7 +41,7 @@
<!-- Application snippet label, version and icon -->
<include
- layout="@layout/manage_applications_item"
+ layout="@layout/app_item"
android:id="@+id/app_snippet" />
</LinearLayout>
diff --git a/res/layout/data_usage_item.xml b/res/layout/data_usage_item.xml
index 6f496d5..5e931f9 100644
--- a/res/layout/data_usage_item.xml
+++ b/res/layout/data_usage_item.xml
@@ -20,6 +20,6 @@
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
- <include layout="@layout/app_percentage_item" />
+ <include layout="@layout/app_item" />
</FrameLayout>
diff --git a/res/layout/installed_app_details.xml b/res/layout/installed_app_details.xml
index b703ec0..fd98ec3 100644
--- a/res/layout/installed_app_details.xml
+++ b/res/layout/installed_app_details.xml
@@ -37,7 +37,7 @@
<!-- Application snippet label, version and icon -->
<include
- layout="@layout/manage_applications_item"
+ layout="@layout/app_item"
android:id="@+id/app_snippet" />
<Space
diff --git a/res/layout/manage_applications_item.xml b/res/layout/manage_applications_item.xml
deleted file mode 100755
index 6d24114..0000000
--- a/res/layout/manage_applications_item.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2008, 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.
-*/
--->
-
-<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:minHeight="72dp"
- android:paddingStart="?android:attr/listPreferredItemPaddingStart"
- android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
- android:paddingTop="16dip"
- android:paddingBottom="16dip"
- android:columnCount="4">
-
- <ImageView
- android:id="@+id/app_icon"
- android:layout_width="@dimen/app_icon_size"
- android:layout_height="@dimen/app_icon_size"
- android:layout_rowSpan="2"
- android:layout_marginEnd="16dip"
- android:scaleType="centerInside"
- android:contentDescription="@null"
- android:duplicateParentState="true" />
-
- <TextView
- android:id="@+id/app_name"
- android:layout_width="0dip"
- android:layout_columnSpan="2"
- android:layout_gravity="fill_horizontal"
- android:layout_marginTop="2dip"
- android:singleLine="true"
- android:ellipsize="marquee"
- android:textAppearance="@android:style/TextAppearance.Material.Subhead"
- android:textAlignment="viewStart"
- android:duplicateParentState="true" />
-
- <CheckBox android:id="@+id/app_on_sdcard"
- android:layout_marginStart="8dip"
- android:layout_gravity="center_vertical"
- android:layout_rowSpan="2"
- android:visibility="gone"
- android:clickable="false"
- android:focusable="false"
- android:duplicateParentState="true" />
-
- <TextView
- android:id="@+id/app_summary"
- android:layout_column="1"
- android:layout_row="1"
- android:layout_gravity="fill_horizontal|top"
- android:textAppearance="@android:style/TextAppearance.Material.Body1"
- android:textColor="?android:attr/textColorSecondary"
- android:textAlignment="viewStart"
- android:singleLine="true"
- android:ellipsize="marquee"
- android:duplicateParentState="true" />
-
- <TextView
- android:id="@+id/app_disabled"
- android:layout_width="0dip"
- android:layout_marginStart="8dip"
- android:layout_gravity="fill_horizontal|top"
- android:textAppearance="@android:style/TextAppearance.Material.Body1"
- android:textColor="?android:attr/textColorSecondary"
- android:textAlignment="viewEnd"
- android:singleLine="true"
- android:ellipsize="marquee"
- android:duplicateParentState="true" />
-
-</GridLayout>
diff --git a/res/layout/preference_app_percentage.xml b/res/layout/preference_app.xml
index 7dc9d46..da348fd 100644
--- a/res/layout/preference_app_percentage.xml
+++ b/res/layout/preference_app.xml
@@ -20,6 +20,6 @@
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
- <include layout="@layout/app_percentage_item" />
+ <include layout="@layout/app_item" />
</LinearLayout>
diff --git a/res/layout/preference_material_settings.xml b/res/layout/preference_material_settings.xml
new file mode 100644
index 0000000..f2dd2e1
--- /dev/null
+++ b/res/layout/preference_material_settings.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2015 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.
+-->
+
+<!-- Based off frameworks/base/core/res/res/layout/preference_material.xml
+ except that this has the negative margin on the image removed. -->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="?android:attr/listPreferredItemHeightSmall"
+ android:gravity="center_vertical"
+ android:paddingStart="?android:attr/listPreferredItemPaddingStart"
+ android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
+ android:background="?android:attr/activatedBackgroundIndicator"
+ android:clipToPadding="false">
+
+ <LinearLayout
+ android:id="@*android:id/icon_frame"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:minWidth="60dp"
+ android:gravity="start|center_vertical"
+ android:orientation="horizontal"
+ android:paddingEnd="12dp"
+ android:paddingTop="4dp"
+ android:paddingBottom="4dp">
+ <com.android.internal.widget.PreferenceImageView
+ android:id="@android:id/icon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:maxWidth="48dp"
+ android:maxHeight="48dp" />
+ </LinearLayout>
+
+ <RelativeLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp">
+
+ <TextView android:id="@android:id/title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:singleLine="true"
+ android:textAppearance="?android:attr/textAppearanceListItem"
+ android:ellipsize="marquee" />
+
+ <TextView android:id="@android:id/summary"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@android:id/title"
+ android:layout_alignStart="@android:id/title"
+ android:textAppearance="?android:attr/textAppearanceListItemSecondary"
+ android:textColor="?android:attr/textColorSecondary"
+ android:maxLines="10" />
+
+ </RelativeLayout>
+
+ <!-- Preference should place its actual preference widget here. -->
+ <LinearLayout android:id="@android:id/widget_frame"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:gravity="end|center_vertical"
+ android:paddingStart="16dp"
+ android:orientation="vertical" />
+
+</LinearLayout>
diff --git a/res/layout/widget_progress_bar.xml b/res/layout/widget_progress_bar.xml
new file mode 100644
index 0000000..a2a5154
--- /dev/null
+++ b/res/layout/widget_progress_bar.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2015 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.
+-->
+
+<ProgressBar xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@android:id/progress"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="4dp"
+ android:max="100"
+ style="?android:attr/progressBarStyleHorizontal" />
diff --git a/res/layout/widget_text_views.xml b/res/layout/widget_text_views.xml
new file mode 100644
index 0000000..2e029e8
--- /dev/null
+++ b/res/layout/widget_text_views.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2015 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal">
+
+ <TextView
+ android:id="@+id/widget_text1"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:layout_gravity="fill_horizontal|top"
+ android:textAppearance="@android:style/TextAppearance.Material.Body1"
+ android:textColor="?android:attr/textColorSecondary"
+ android:textAlignment="viewStart"
+ android:singleLine="true"
+ android:ellipsize="marquee"
+ android:duplicateParentState="true" />
+
+ <TextView
+ android:id="@+id/widget_text2"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:layout_marginStart="8dip"
+ android:layout_gravity="fill_horizontal|top"
+ android:textAppearance="@android:style/TextAppearance.Material.Body1"
+ android:textColor="?android:attr/textColorSecondary"
+ android:textAlignment="viewEnd"
+ android:singleLine="true"
+ android:ellipsize="marquee"
+ android:duplicateParentState="true" />
+
+</LinearLayout>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 1b7caf7..d24337f 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -93,6 +93,10 @@
<item name="android:windowContentOverlay">@null</item>
</style>
+ <style name="Preference">
+ <item name="android:layout">@layout/preference_material_settings</item>
+ </style>
+
<style name="PreferenceHeaderPanelSinglePane">
<item name="android:layout_marginStart">0dp</item>
<item name="android:layout_marginEnd">0dp</item>
@@ -339,4 +343,4 @@
<item name="android:textSize">16sp</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
</style>
-</resources> \ No newline at end of file
+</resources>
diff --git a/res/values/themes.xml b/res/values/themes.xml
index 08b8de3..e6621a8 100644
--- a/res/values/themes.xml
+++ b/res/values/themes.xml
@@ -80,6 +80,7 @@
<style name="Theme.SettingsBase" parent="@android:style/Theme.Material.Settings" />
<style name="Theme.Settings" parent="Theme.SettingsBase">
+ <item name="@*android:preferenceStyle">@style/Preference</item>
<item name="@*android:preferenceHeaderPanelStyle">@style/PreferenceHeaderPanelSinglePane</item>
<item name="@*android:preferencePanelStyle">@style/PreferencePanelSinglePane</item>
<item name="@*android:preferenceListStyle">@style/PreferenceHeaderListSinglePane</item>