Unbanish memory screen and new UX
Give memory screen a makeover so that it looks nice enough to be
restored to its rightful home.
Bug: 20694769
Change-Id: I2f6933037b3fbbfb0d9fe5e3ca821ef59e171faa
diff --git a/res/layout/app_item_linear_color.xml b/res/layout/app_item_linear_color.xml
index 62eebb9..7a4aad5 100755
--- a/res/layout/app_item_linear_color.xml
+++ b/res/layout/app_item_linear_color.xml
@@ -15,7 +15,7 @@
limitations under the License.
-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<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"
@@ -34,16 +34,19 @@
android:duplicateParentState="true" />
<LinearLayout
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="vertical"
+ 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"
@@ -55,20 +58,22 @@
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:textAlignment="viewStart"
+ android:gravity="end|bottom"
android:duplicateParentState="true" />
</LinearLayout>
<com.android.settings.applications.LinearColorBar
android:id="@+id/linear_color_bar"
- android:layout_width="0dp"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:layout_marginTop="5dp"
+ 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" />
-</LinearLayout>
+</RelativeLayout>
diff --git a/res/layout/horizontal_preference.xml b/res/layout/horizontal_preference.xml
index 4e16e9a..722e053 100644
--- a/res/layout/horizontal_preference.xml
+++ b/res/layout/horizontal_preference.xml
@@ -38,6 +38,6 @@
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_weight="1"
- android:gravity="end" />
+ android:gravity="end|bottom" />
</LinearLayout>
diff --git a/res/layout/proc_stats_ui.xml b/res/layout/proc_stats_ui.xml
index 5f78178..9d0a22d 100644
--- a/res/layout/proc_stats_ui.xml
+++ b/res/layout/proc_stats_ui.xml
@@ -28,28 +28,18 @@
android:id="@+id/memory_state"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="20dp"
- android:layout_marginBottom="10dp"
- android:textAppearance="@android:style/TextAppearance.Material.Subhead"
+ android:layout_marginTop="5dp"
+ android:layout_marginBottom="5dp"
+ android:textColor="?android:attr/colorAccent"
+ android:textAppearance="@android:style/TextAppearance.Material.Display1"
/>
<com.android.settings.applications.LinearColorBar
android:id="@+id/color_bar"
android:layout_width="match_parent"
- android:layout_height="30dp"
+ android:layout_height="28dp"
+ android:layout_marginBottom="15dp"
/>
- <TextView
- android:id="@+id/memory_used"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="2dp"
- android:layout_marginBottom="10dp"
- android:textAppearance="@android:style/TextAppearance.Material.Small"
- android:textColor="?android:attr/textColorSecondary"
- />
-
- <include layout="@layout/memory_key" />
-
</LinearLayout>
diff --git a/res/layout/single_button_panel.xml b/res/layout/single_button_panel.xml
index 2af1765..348f7ce 100755
--- a/res/layout/single_button_panel.xml
+++ b/res/layout/single_button_panel.xml
@@ -25,8 +25,8 @@
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:gravity="bottom"
- android:paddingTop="6dip"
- android:paddingBottom="6dip"
+ android:paddingTop="8dip"
+ android:paddingBottom="8dip"
android:orientation="horizontal">
<Button
android:id="@+id/button"