diff options
author | Svetoslav <svetoslavganov@google.com> | 2013-10-16 16:41:30 -0700 |
---|---|---|
committer | Svetoslav <svetoslavganov@google.com> | 2013-10-16 16:45:33 -0700 |
commit | b196106a43355ec56bc2354cae1d1bbf21ab9b4b (patch) | |
tree | f96153e53d0822d6110b79ac90349361ca978143 | |
parent | 67fc6b0b4708161bc8e716f7effc47e7c15d1ca6 (diff) | |
download | frameworks_base-b196106a43355ec56bc2354cae1d1bbf21ab9b4b.zip frameworks_base-b196106a43355ec56bc2354cae1d1bbf21ab9b4b.tar.gz frameworks_base-b196106a43355ec56bc2354cae1d1bbf21ab9b4b.tar.bz2 |
Printer list items have wrong width.
1. There was leftover code in the printers adapter that was
hard coding the item width with no reason to do so.
2. Changed the icon view visibility to invisible to allow
the text of all list items including save to PDF and all
printers to be left aligned.
bug:11225340
Change-Id: I5b51d0d30577699f5cd73c7c58521358653d135b
-rw-r--r-- | packages/PrintSpooler/res/layout/printer_dropdown_item.xml | 16 | ||||
-rw-r--r-- | packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java | 4 |
2 files changed, 9 insertions, 11 deletions
diff --git a/packages/PrintSpooler/res/layout/printer_dropdown_item.xml b/packages/PrintSpooler/res/layout/printer_dropdown_item.xml index 2749aa6..1a61b99 100644 --- a/packages/PrintSpooler/res/layout/printer_dropdown_item.xml +++ b/packages/PrintSpooler/res/layout/printer_dropdown_item.xml @@ -15,13 +15,13 @@ --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:paddingStart="16dip" - android:paddingEnd="16dip" - android:minHeight="?android:attr/listPreferredItemHeightSmall" - android:orientation="horizontal" - android:gravity="start|center_vertical"> + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:paddingStart="16dip" + android:paddingEnd="16dip" + android:minHeight="?android:attr/listPreferredItemHeightSmall" + android:orientation="horizontal" + android:gravity="start|center_vertical"> <ImageView android:id="@+id/icon" @@ -31,7 +31,7 @@ android:layout_marginEnd="8dip" android:duplicateParentState="true" android:contentDescription="@null" - android:visibility="gone"> + android:visibility="invisible"> </ImageView> <LinearLayout diff --git a/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java b/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java index 2997707..ee5ff16 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java +++ b/packages/PrintSpooler/src/com/android/printspooler/PrintJobConfigActivity.java @@ -2303,8 +2303,6 @@ public class PrintJobConfigActivity extends Activity { R.layout.printer_dropdown_item, parent, false); } - convertView.getLayoutParams().width = mDestinationSpinner.getWidth(); - CharSequence title = null; CharSequence subtitle = null; Drawable icon = null; @@ -2353,7 +2351,7 @@ public class PrintJobConfigActivity extends Activity { iconView.setImageDrawable(icon); iconView.setVisibility(View.VISIBLE); } else { - iconView.setVisibility(View.GONE); + iconView.setVisibility(View.INVISIBLE); } return convertView; |