From c404cacd3a480776dd625fb300810ffccc5f51b0 Mon Sep 17 00:00:00 2001 From: Svetoslav Date: Wed, 27 Aug 2014 18:37:16 -0700 Subject: [PATCH] Print UI polish. 1. Fixed an issue where input focus is given to the copies edit text every other time we expand the options UI. We want focus there only if the user touches the control. bug:16966145 2. Fixed the all printers list view to have item dividers reaching the left and right ends of the list view. bug:17288761 3. Fixed an issue where the user can deselect all pages which is not only an invalid state but also causes a crash. bug:17286198 4. Tweaked the minimal size of the preview in landscape on phone to better accomodate the page. bug:17288904 5. Fixed a regression introduced by a change from the UI folks. Change-Id: Ida7dad7eea413295a840028060810b2619c616e8 --- .../res/layout/print_activity.xml | 1 + .../res/layout/print_activity_controls.xml | 10 ++- .../res/layout/printer_dropdown_item.xml | 4 +- .../res/layout/select_printer_activity.xml | 2 - .../res/layout/spinner_dropdown_item.xml | 52 -------------- .../res/values-land/constants.xml | 4 -- .../PrintSpooler/res/values/constants.xml | 5 +- packages/PrintSpooler/res/values/themes.xml | 5 +- .../android/printspooler/ui/PageAdapter.java | 25 +++---- .../printspooler/ui/PrintActivity.java | 14 ++-- .../widget/FirstFocusableEditText.java | 69 ------------------- .../printspooler/widget/PrintContentView.java | 22 ++++-- 12 files changed, 47 insertions(+), 166 deletions(-) delete mode 100644 packages/PrintSpooler/res/layout/spinner_dropdown_item.xml delete mode 100644 packages/PrintSpooler/src/com/android/printspooler/widget/FirstFocusableEditText.java diff --git a/packages/PrintSpooler/res/layout/print_activity.xml b/packages/PrintSpooler/res/layout/print_activity.xml index ee5d42a0cdc14..761d58a93c0c1 100644 --- a/packages/PrintSpooler/res/layout/print_activity.xml +++ b/packages/PrintSpooler/res/layout/print_activity.xml @@ -27,6 +27,7 @@ android:id="@+id/static_content" android:layout_width="fill_parent" android:layout_height="wrap_content" + android:paddingStart="8dip" android:elevation="@dimen/preview_controls_elevation" android:background="?android:attr/colorPrimary"> diff --git a/packages/PrintSpooler/res/layout/print_activity_controls.xml b/packages/PrintSpooler/res/layout/print_activity_controls.xml index 0629481c449de..c2a0da9748302 100644 --- a/packages/PrintSpooler/res/layout/print_activity_controls.xml +++ b/packages/PrintSpooler/res/layout/print_activity_controls.xml @@ -55,8 +55,7 @@ android:text="@string/label_copies"> - - + @@ -198,8 +197,7 @@ android:visibility="visible"> - - + diff --git a/packages/PrintSpooler/res/layout/printer_dropdown_item.xml b/packages/PrintSpooler/res/layout/printer_dropdown_item.xml index 43d8aaf5e8e74..4381a7a32647f 100644 --- a/packages/PrintSpooler/res/layout/printer_dropdown_item.xml +++ b/packages/PrintSpooler/res/layout/printer_dropdown_item.xml @@ -17,8 +17,8 @@ diff --git a/packages/PrintSpooler/res/layout/select_printer_activity.xml b/packages/PrintSpooler/res/layout/select_printer_activity.xml index 173057b6826a8..77c500ab86b20 100644 --- a/packages/PrintSpooler/res/layout/select_printer_activity.xml +++ b/packages/PrintSpooler/res/layout/select_printer_activity.xml @@ -23,8 +23,6 @@ android:id="@android:id/list" android:layout_width="fill_parent" android:layout_height="fill_parent" - android:paddingStart="@dimen/printer_list_view_padding_start" - android:paddingEnd="@dimen/printer_list_view_padding_end" android:scrollbarStyle="outsideOverlay" android:cacheColorHint="@android:color/transparent" android:scrollbarAlwaysDrawVerticalTrack="true" > diff --git a/packages/PrintSpooler/res/layout/spinner_dropdown_item.xml b/packages/PrintSpooler/res/layout/spinner_dropdown_item.xml deleted file mode 100644 index 14403a1caead2..0000000000000 --- a/packages/PrintSpooler/res/layout/spinner_dropdown_item.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - diff --git a/packages/PrintSpooler/res/values-land/constants.xml b/packages/PrintSpooler/res/values-land/constants.xml index a4666a5e2b770..6cf9754b574b0 100644 --- a/packages/PrintSpooler/res/values-land/constants.xml +++ b/packages/PrintSpooler/res/values-land/constants.xml @@ -16,10 +16,6 @@ - 48dip - - 48dip - 2 3 diff --git a/packages/PrintSpooler/res/values/constants.xml b/packages/PrintSpooler/res/values/constants.xml index b95703b63b764..b4e47772cd518 100644 --- a/packages/PrintSpooler/res/values/constants.xml +++ b/packages/PrintSpooler/res/values/constants.xml @@ -28,9 +28,6 @@ 400dip - 16dip - 16dip - 6dip 2dip @@ -46,6 +43,6 @@ 50% 32dip - 130dip + 128dip diff --git a/packages/PrintSpooler/res/values/themes.xml b/packages/PrintSpooler/res/values/themes.xml index db319e96dc8a3..532b01f7431b0 100644 --- a/packages/PrintSpooler/res/values/themes.xml +++ b/packages/PrintSpooler/res/values/themes.xml @@ -16,7 +16,10 @@ -