diff options
author | Svetoslav <svetoslavganov@google.com> | 2014-08-27 18:37:16 -0700 |
---|---|---|
committer | Svetoslav <svetoslavganov@google.com> | 2014-08-27 18:46:23 -0700 |
commit | c404cacd3a480776dd625fb300810ffccc5f51b0 (patch) | |
tree | 4e7fd2370f334a9106bec45094a84930699d547f /packages/PrintSpooler/res | |
parent | f88c2569e94bc0fd2c88470a5d48e140eedf3fca (diff) | |
download | frameworks_base-c404cacd3a480776dd625fb300810ffccc5f51b0.zip frameworks_base-c404cacd3a480776dd625fb300810ffccc5f51b0.tar.gz frameworks_base-c404cacd3a480776dd625fb300810ffccc5f51b0.tar.bz2 |
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
Diffstat (limited to 'packages/PrintSpooler/res')
8 files changed, 12 insertions, 71 deletions
diff --git a/packages/PrintSpooler/res/layout/print_activity.xml b/packages/PrintSpooler/res/layout/print_activity.xml index ee5d42a..761d58a 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 0629481..c2a0da9 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"> </TextView> - <view - class="com.android.printspooler.widget.FirstFocusableEditText" + <EditText android:id="@+id/copies_edittext" android:layout_width="fill_parent" android:layout_height="wrap_content" @@ -64,7 +63,7 @@ android:singleLine="true" android:ellipsize="end" android:inputType="numberDecimal"> - </view> + </EditText> </LinearLayout> @@ -198,8 +197,7 @@ android:visibility="visible"> </TextView> - <view - class="com.android.printspooler.widget.FirstFocusableEditText" + <EditText android:id="@+id/page_range_edittext" android:layout_width="fill_parent" android:layout_height="wrap_content" @@ -208,7 +206,7 @@ android:ellipsize="end" android:visibility="visible" android:inputType="textNoSuggestions"> - </view> + </EditText> </LinearLayout> diff --git a/packages/PrintSpooler/res/layout/printer_dropdown_item.xml b/packages/PrintSpooler/res/layout/printer_dropdown_item.xml index 43d8aaf..4381a7a 100644 --- a/packages/PrintSpooler/res/layout/printer_dropdown_item.xml +++ b/packages/PrintSpooler/res/layout/printer_dropdown_item.xml @@ -17,8 +17,8 @@ <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:paddingStart="8dip" + android:paddingEnd="8dip" android:minHeight="56dip" android:orientation="horizontal" android:gravity="start|center_vertical"> diff --git a/packages/PrintSpooler/res/layout/select_printer_activity.xml b/packages/PrintSpooler/res/layout/select_printer_activity.xml index 173057b..77c500a 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 14403a1..0000000 --- a/packages/PrintSpooler/res/layout/spinner_dropdown_item.xml +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2013 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="fill_parent" - android:layout_height="wrap_content" - android:minHeight="?android:attr/listPreferredItemHeightSmall" - android:orientation="vertical" - android:gravity="start|center_vertical"> - - <TextView - android:id="@+id/title" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - style="?android:attr/spinnerDropDownItemStyle" - android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="?android:attr/textColorPrimary" - android:singleLine="true" - android:ellipsize="end" - android:textIsSelectable="false" - android:gravity="top|left" - android:duplicateParentState="true"> - </TextView> - - <TextView - android:id="@+id/subtitle" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - style="?android:attr/spinnerDropDownItemStyle" - android:textAppearance="?android:attr/textAppearanceSmall" - android:textColor="?android:attr/textColorPrimary" - android:singleLine="true" - android:ellipsize="end" - android:textIsSelectable="false" - android:visibility="gone" - android:duplicateParentState="true"> - </TextView> - -</LinearLayout> diff --git a/packages/PrintSpooler/res/values-land/constants.xml b/packages/PrintSpooler/res/values-land/constants.xml index a4666a5..6cf9754 100644 --- a/packages/PrintSpooler/res/values-land/constants.xml +++ b/packages/PrintSpooler/res/values-land/constants.xml @@ -16,10 +16,6 @@ <resources> - <dimen name="printer_list_view_padding_start">48dip</dimen> - - <dimen name="printer_list_view_padding_end">48dip</dimen> - <integer name="preview_page_per_row_count">2</integer> <integer name="print_option_column_count">3</integer> diff --git a/packages/PrintSpooler/res/values/constants.xml b/packages/PrintSpooler/res/values/constants.xml index b95703b..b4e4777 100644 --- a/packages/PrintSpooler/res/values/constants.xml +++ b/packages/PrintSpooler/res/values/constants.xml @@ -28,9 +28,6 @@ <dimen name="print_dialog_frame_max_width_dip">400dip</dimen> - <dimen name="printer_list_view_padding_start">16dip</dimen> - <dimen name="printer_list_view_padding_end">16dip</dimen> - <dimen name="selected_page_elevation">6dip</dimen> <dimen name="unselected_page_elevation">2dip</dimen> @@ -46,6 +43,6 @@ <fraction name="page_unselected_alpha">50%</fraction> <dimen name="preview_page_footer_height">32dip</dimen> - <dimen name="preview_page_min_width">130dip</dimen> + <dimen name="preview_page_min_width">128dip</dimen> </resources> diff --git a/packages/PrintSpooler/res/values/themes.xml b/packages/PrintSpooler/res/values/themes.xml index db319e9..532b01f 100644 --- a/packages/PrintSpooler/res/values/themes.xml +++ b/packages/PrintSpooler/res/values/themes.xml @@ -16,7 +16,10 @@ <resources> - <style name="PrintActivity" parent="@android:style/Theme.Material.Settings"> + <style name="PrintActivity" parent="@android:style/Theme.Material"> + <item name="android:colorPrimary">@*android:color/material_blue_grey_900</item> + <item name="android:colorPrimaryDark">@*android:color/material_blue_grey_950</item> + <item name="android:colorAccent">@*android:color/material_deep_teal_500</item> <item name="android:windowIsTranslucent">true</item> <item name="android:windowBackground">@android:color/transparent</item> <item name="android:windowContentOverlay">@null</item> |