diff options
author | Jeff Sharkey <jsharkey@android.com> | 2012-11-30 12:38:55 -0800 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2012-11-30 14:26:47 -0800 |
commit | 6f8cd76870b01cd27333d3ddd8dcb3a7951e3375 (patch) | |
tree | f221256e88a9a936eaf6232dd08044c19e98bb50 /res/layout | |
parent | 8f28cd5d75e385f52d6b29e19eccd7eb639d6579 (diff) | |
download | packages_apps_settings-6f8cd76870b01cd27333d3ddd8dcb3a7951e3375.zip packages_apps_settings-6f8cd76870b01cd27333d3ddd8dcb3a7951e3375.tar.gz packages_apps_settings-6f8cd76870b01cd27333d3ddd8dcb3a7951e3375.tar.bz2 |
Fix text alignment and simplify layouts.
Fix Apps items to correctly base align text, and to align correctly
in RTL mode. Use GridLayout to reduce layout complexity.
Bug: 7633350, 7132595
Change-Id: Ic3563cfe408ebcdaef1ed693cc6b01b886d700ea
Diffstat (limited to 'res/layout')
-rw-r--r-- | res/layout/app_percentage_item.xml | 7 | ||||
-rw-r--r-- | res/layout/dream_info_row.xml | 2 | ||||
-rwxr-xr-x | res/layout/manage_applications_item.xml | 92 | ||||
-rw-r--r-- | res/layout/running_processes_item.xml | 129 |
4 files changed, 103 insertions, 127 deletions
diff --git a/res/layout/app_percentage_item.xml b/res/layout/app_percentage_item.xml index b5e6db7..8bdbadb 100644 --- a/res/layout/app_percentage_item.xml +++ b/res/layout/app_percentage_item.xml @@ -26,8 +26,8 @@ <ImageView android:id="@android:id/icon" - android:layout_width="48dip" - android:layout_height="48dip" + android:layout_width="@android:dimen/app_icon_size" + android:layout_height="@android:dimen/app_icon_size" android:layout_rowSpan="3" android:layout_marginEnd="8dip" android:scaleType="centerInside" @@ -37,10 +37,11 @@ android:id="@android:id/title" android:layout_width="0dip" android:layout_gravity="fill_horizontal" + android:layout_marginTop="2dip" android:singleLine="true" android:ellipsize="marquee" android:textAppearance="?android:attr/textAppearanceMedium" - android:textDirection="locale" /> + android:textAlignment="viewStart" /> <TextView android:id="@android:id/text1" diff --git a/res/layout/dream_info_row.xml b/res/layout/dream_info_row.xml index a2f81c6..acc3a65 100644 --- a/res/layout/dream_info_row.xml +++ b/res/layout/dream_info_row.xml @@ -54,7 +54,7 @@ android:ellipsize="end" android:singleLine="true" android:textAppearance="?android:attr/textAppearanceMedium" - android:textDirection="locale" + android:textAlignment="viewStart" android:labelFor="@android:id/button2" /> <!-- Dream radio button --> diff --git a/res/layout/manage_applications_item.xml b/res/layout/manage_applications_item.xml index 3c7944e..f471f55 100755 --- a/res/layout/manage_applications_item.xml +++ b/res/layout/manage_applications_item.xml @@ -17,68 +17,54 @@ */ --> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" +<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:orientation="horizontal" - android:paddingEnd="6dip" - android:paddingStart="6dip" - android:paddingTop="5dip" - android:paddingBottom="5dip" - android:gravity="center_vertical" > + android:paddingStart="?android:attr/listPreferredItemPaddingStart" + android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" + android:paddingTop="8dip" + android:paddingBottom="8dip" + android:columnCount="4"> - <ImageView android:id="@+id/app_icon" + <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="11dip" - android:layout_gravity="center_vertical" - android:scaleType="fitCenter" - android:contentDescription="@null"/> + android:layout_rowSpan="2" + android:layout_marginEnd="8dip" + android:scaleType="centerInside" + android:contentDescription="@null" /> + + <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:attr/textAppearanceMedium" + android:textAlignment="viewStart" /> - <LinearLayout - android:orientation="vertical" - android:layout_width="0px" - android:layout_weight="1" - android:layout_height="wrap_content" > - <TextView android:id="@+id/app_name" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textAppearance="?android:attr/textAppearanceMedium" - android:textStyle="bold" - android:singleLine="true" - android:ellipsize="marquee" - android:layout_marginBottom="2dip" /> - <LinearLayout - android:orientation="horizontal" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:baselineAlignedChildIndex="0" > - <TextView android:id="@+id/app_size" - android:layout_marginTop="-4dip" - android:layout_gravity="center_vertical|start" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_weight="1" - android:textAppearance="?android:attr/textAppearanceSmall" /> - <TextView android:id="@+id/app_disabled" - android:layout_marginTop="-4dip" - android:layout_gravity="center_vertical|end" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_weight="0" - android:visibility="gone" - android:textAppearance="?android:attr/textAppearanceSmall" - android:text="@string/disabled" /> - </LinearLayout> - </LinearLayout> - <CheckBox android:id="@+id/app_on_sdcard" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginStart="5dip" + android:layout_marginStart="8dip" android:layout_gravity="center_vertical" + android:layout_rowSpan="2" android:visibility="gone" android:clickable="false" android:focusable="false" /> -</LinearLayout> + + <TextView + android:id="@+id/app_size" + android:layout_width="0dip" + android:layout_gravity="fill_horizontal" + android:textAppearance="?android:attr/textAppearanceSmall" + android:textAlignment="viewStart" /> + + <TextView + android:id="@+id/app_disabled" + android:layout_marginStart="8dip" + android:textAppearance="?android:attr/textAppearanceSmall" /> + +</GridLayout> diff --git a/res/layout/running_processes_item.xml b/res/layout/running_processes_item.xml index 7cc2d8d..e64b594 100644 --- a/res/layout/running_processes_item.xml +++ b/res/layout/running_processes_item.xml @@ -17,79 +17,68 @@ */ --> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" +<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:orientation="vertical" - android:gravity="fill" > + android:paddingStart="?android:attr/listPreferredItemPaddingStart" + android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" + android:paddingTop="8dip" + android:paddingBottom="8dip" + android:columnCount="2"> + + <ImageView + android:id="@+id/icon" + android:layout_width="@android:dimen/app_icon_size" + android:layout_height="@android:dimen/app_icon_size" + android:layout_rowSpan="2" + android:layout_marginEnd="8dip" + android:scaleType="centerInside" + android:contentDescription="@null" /> <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_weight="1" - android:orientation="horizontal" - android:paddingEnd="6dip" - android:paddingStart="6dip" - android:gravity="center_vertical" > - - <ImageView android:id="@+id/icon" - android:layout_width="@android:dimen/app_icon_size" - android:layout_height="@android:dimen/app_icon_size" - android:layout_marginEnd="11dip" - android:layout_gravity="center_vertical" - android:scaleType="fitCenter" - android:contentDescription="@null" /> - - <LinearLayout - android:orientation="vertical" - android:layout_width="match_parent" - android:layout_height="wrap_content" > - <LinearLayout - android:orientation="horizontal" - android:baselineAlignedChildIndex="0" - android:layout_width="match_parent" - android:layout_height="wrap_content"> - <TextView android:id="@+id/name" - android:layout_width="0px" - android:layout_height="wrap_content" - android:layout_weight="1" - android:paddingEnd="4dip" - android:textAppearance="?android:attr/textAppearanceMedium" - android:textStyle="bold" - android:singleLine="true" - android:ellipsize="marquee" - android:layout_marginBottom="2dip" /> - <TextView android:id="@+id/size" - android:layout_gravity="center_vertical|end" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_weight="0" - android:singleLine="true" - android:textAppearance="?android:attr/textAppearanceSmall" /> - </LinearLayout> - <LinearLayout - android:orientation="horizontal" - android:baselineAlignedChildIndex="0" - android:layout_width="match_parent" - android:layout_height="wrap_content"> - <TextView android:id="@+id/description" - android:layout_gravity="center_vertical|start" - android:layout_width="0px" - android:layout_height="wrap_content" - android:layout_weight="1" - android:paddingEnd="4dip" - android:singleLine="true" - android:ellipsize="marquee" - android:textAppearance="?android:attr/textAppearanceSmall" /> - <TextView android:id="@+id/uptime" - android:layout_gravity="center_vertical|end" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_weight="0" - android:singleLine="true" - android:textAppearance="?android:attr/textAppearanceSmall" /> - </LinearLayout> - </LinearLayout> + android:layout_width="0dip" + android:layout_gravity="fill_horizontal" + android:layout_marginTop="2dip"> + + <TextView + android:id="@+id/name" + android:layout_width="0dip" + android:layout_height="wrap_content" + android:layout_weight="1" + android:singleLine="true" + android:ellipsize="marquee" + android:textAppearance="?android:attr/textAppearanceMedium" + android:textAlignment="viewStart" /> + + <TextView + android:id="@+id/size" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="8dip" + android:textAppearance="?android:attr/textAppearanceSmall" /> + </LinearLayout> -</LinearLayout> + + <LinearLayout + android:layout_width="0dip" + android:layout_gravity="fill_horizontal"> + + <TextView + android:id="@+id/description" + android:layout_width="0dip" + android:layout_height="wrap_content" + android:layout_weight="1" + android:textAppearance="?android:attr/textAppearanceSmall" + android:textAlignment="viewStart" /> + + <TextView + android:id="@+id/uptime" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="8dip" + android:textAppearance="?android:attr/textAppearanceSmall" /> + + </LinearLayout> + +</GridLayout> |