diff options
author | Svetoslav <svetoslavganov@google.com> | 2013-07-17 18:37:36 -0700 |
---|---|---|
committer | Svetoslav Ganov <svetoslavganov@google.com> | 2013-07-19 16:23:12 -0700 |
commit | 597945fd3a6b52ac70bb9afc5ec8c59039fffd77 (patch) | |
tree | 1e44c6e0c34deba26033b46878bbbfd010a3f8d9 /packages/PrintSpooler/res/layout | |
parent | 7a5480d6d74eb64a360ed20062c66926c9eef9bc (diff) | |
download | frameworks_base-597945fd3a6b52ac70bb9afc5ec8c59039fffd77.zip frameworks_base-597945fd3a6b52ac70bb9afc5ec8c59039fffd77.tar.gz frameworks_base-597945fd3a6b52ac70bb9afc5ec8c59039fffd77.tar.bz2 |
First pass of the print dialog UX
Change-Id: I315a16d7f68c73ca180c76e722847b4b1bdea55b
Diffstat (limited to 'packages/PrintSpooler/res/layout')
-rw-r--r-- | packages/PrintSpooler/res/layout/print_job_config_activity.xml | 425 | ||||
-rw-r--r-- | packages/PrintSpooler/res/layout/spinner_dropdown_item.xml | 48 |
2 files changed, 235 insertions, 238 deletions
diff --git a/packages/PrintSpooler/res/layout/print_job_config_activity.xml b/packages/PrintSpooler/res/layout/print_job_config_activity.xml index 51e425d..8736bdd 100644 --- a/packages/PrintSpooler/res/layout/print_job_config_activity.xml +++ b/packages/PrintSpooler/res/layout/print_job_config_activity.xml @@ -14,248 +14,197 @@ limitations under the License. --> -<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" - android:layout_height="wrap_content"> + android:layout_height="wrap_content" + android:orientation="vertical"> - <GridLayout - android:layout_width="wrap_content" + <ScrollView + android:layout_width="fill_parent" android:layout_height="wrap_content" - android:layout_gravity="center" - android:orientation="vertical" - android:columnCount="2"> + android:background="@*android:color/bright_foreground_disabled_holo_light"> - <EditText - android:id="@+id/copies_edittext" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:layout_marginLeft="12dip" - android:layout_marginRight="12dip" - android:layout_row="0" - android:layout_column="1" - android:minWidth="150dip" - android:inputType="number" - android:selectAllOnFocus="true"> - </EditText> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginLeft="12dip" - android:layout_marginRight="12dip" - android:layout_row="0" - android:layout_column="0" - android:text="@string/label_copies" - android:textAppearance="?android:attr/textAppearanceMedium" - android:labelFor="@id/copies_edittext"> - </TextView> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginLeft="12dip" - android:layout_marginRight="12dip" - android:layout_row="1" - android:layout_column="0" - android:text="@string/label_destination" - android:textAppearance="?android:attr/textAppearanceMedium"> - </TextView> - - <Spinner - android:id="@+id/destination_spinner" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:layout_marginLeft="12dip" - android:layout_marginRight="12dip" - android:layout_row="1" - android:layout_column="1" - android:minWidth="150dip"> - </Spinner> - - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginLeft="12dip" - android:layout_marginRight="12dip" - android:layout_row="2" - android:layout_column="0" - android:text="@string/label_media_size" - android:textAppearance="?android:attr/textAppearanceMedium"> - </TextView> - - <Spinner - android:id="@+id/media_size_spinner" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:layout_marginLeft="12dip" - android:layout_marginRight="12dip" - android:layout_row="2" - android:layout_column="1" - android:minWidth="150dip"> - </Spinner> - - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginLeft="12dip" - android:layout_marginRight="12dip" - android:layout_row="3" - android:layout_column="0" - android:text="@string/label_resolution" - android:textAppearance="?android:attr/textAppearanceMedium"> - </TextView> - - <Spinner - android:id="@+id/resolution_spinner" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:layout_marginLeft="12dip" - android:layout_marginRight="12dip" - android:layout_row="3" - android:layout_column="1" - android:minWidth="150dip"> - </Spinner> - - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginLeft="12dip" - android:layout_marginRight="12dip" - android:layout_row="4" - android:layout_column="0" - android:text="@string/label_input_tray" - android:textAppearance="?android:attr/textAppearanceMedium"> - </TextView> - - <Spinner - android:id="@+id/input_tray_spinner" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:layout_marginLeft="12dip" - android:layout_marginRight="12dip" - android:layout_row="4" - android:layout_column="1" - android:minWidth="150dip"> - </Spinner> - - - <TextView + <GridLayout android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="12dip" - android:layout_marginRight="12dip" - android:layout_row="5" - android:layout_column="0" - android:text="@string/label_output_tray" - android:textAppearance="?android:attr/textAppearanceMedium"> - </TextView> - - <Spinner - android:id="@+id/output_tray_spinner" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:layout_marginLeft="12dip" - android:layout_marginRight="12dip" - android:layout_row="5" - android:layout_column="1" - android:minWidth="150dip"> - </Spinner> - - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginLeft="12dip" - android:layout_marginRight="12dip" - android:layout_row="6" - android:layout_column="0" - android:text="@string/label_duplex_mode" - android:textAppearance="?android:attr/textAppearanceMedium"> - </TextView> - - <Spinner - android:id="@+id/duplex_mode_spinner" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:layout_marginLeft="12dip" - android:layout_marginRight="12dip" - android:layout_row="6" - android:layout_column="1" - android:minWidth="150dip"> - </Spinner> - - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginLeft="12dip" - android:layout_marginRight="12dip" - android:layout_row="7" - android:layout_column="0" - android:text="@string/label_color_mode" - android:textAppearance="?android:attr/textAppearanceMedium"> - </TextView> - - <Spinner - android:id="@+id/color_mode_spinner" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:layout_marginLeft="12dip" - android:layout_marginRight="12dip" - android:layout_row="7" - android:layout_column="1" - android:minWidth="150dip"> - </Spinner> - - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginLeft="12dip" - android:layout_marginRight="12dip" - android:layout_row="8" - android:layout_column="0" - android:text="@string/label_fitting_mode" - android:textAppearance="?android:attr/textAppearanceMedium"> - </TextView> - - <Spinner - android:id="@+id/fitting_mode_spinner" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:layout_marginLeft="12dip" - android:layout_marginRight="12dip" - android:layout_row="8" - android:layout_column="1" - android:minWidth="150dip"> - </Spinner> - - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginLeft="12dip" - android:layout_marginRight="12dip" - android:layout_row="9" - android:layout_column="0" - android:text="@string/label_orientation" - android:textAppearance="?android:attr/textAppearanceMedium"> - </TextView> - - <Spinner - android:id="@+id/orientation_spinner" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:layout_marginLeft="12dip" - android:layout_marginRight="12dip" - android:layout_row="9" - android:layout_column="1" - android:minWidth="150dip"> - </Spinner> - - </GridLayout> + android:layout_margin="32dip" + android:orientation="vertical" + android:columnCount="2"> + + <!-- Destination --> + + <Spinner + android:id="@+id/destination_spinner" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="12dip" + android:layout_row="0" + android:layout_column="0" + android:layout_columnSpan="2" + android:minWidth="324dip" + android:minHeight="?android:attr/listPreferredItemHeightSmall"> + </Spinner> + + <!-- Copies --> + + <view + class="com.android.printspooler.PrintJobConfigActivity$CustomEditText" + android:id="@+id/copies_edittext" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginRight="12dip" + android:layout_marginBottom="12dip" + android:layout_row="2" + android:layout_column="0" + android:layout_gravity="bottom" + android:inputType="numberDecimal" + android:selectAllOnFocus="true" + android:minWidth="150dip"> + </view> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="12dip" + android:layout_marginRight="12dip" + android:layout_row="1" + android:layout_column="0" + android:layout_gravity="left|bottom" + android:text="@string/label_copies" + android:textAppearance="?android:attr/textAppearanceSmall" + android:textStyle="bold" + android:labelFor="@id/copies_edittext"> + </TextView> + + <!-- Paper size --> + + <Spinner + android:id="@+id/paper_size_spinner" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="12dip" + android:layout_marginBottom="12dip" + android:layout_row="2" + android:layout_column="1" + android:minWidth="150dip"> + </Spinner> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginLeft="12dip" + android:layout_marginTop="12dip" + android:layout_row="1" + android:layout_column="1" + android:text="@string/label_paper_size" + android:textAppearance="?android:attr/textAppearanceSmall" + android:textStyle="bold" + android:labelFor="@id/paper_size_spinner"> + </TextView> + + <!-- Color --> + + <Spinner + android:id="@+id/color_spinner" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginRight="12dip" + android:layout_marginBottom="12dip" + android:layout_row="4" + android:layout_column="0" + android:minWidth="150dip"> + </Spinner> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="12dip" + android:layout_marginRight="12dip" + android:layout_row="3" + android:layout_column="0" + android:text="@string/label_color" + android:textAppearance="?android:attr/textAppearanceSmall" + android:textStyle="bold" + android:labelFor="@id/color_spinner"> + </TextView> + + <!-- Orientation --> + + <Spinner + android:id="@+id/orientation_spinner" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="12dip" + android:layout_marginBottom="12dip" + android:layout_row="4" + android:layout_column="1" + android:minWidth="150dip"> + </Spinner> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginLeft="12dip" + android:layout_marginTop="12dip" + android:layout_row="3" + android:layout_column="1" + android:text="@string/label_orientation" + android:textAppearance="?android:attr/textAppearanceSmall" + android:textStyle="bold" + android:labelFor="@id/orientation_spinner"> + </TextView> + + <!-- Pages --> + + <Spinner + android:id="@+id/range_options_spinner" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginRight="12dip" + android:layout_row="6" + android:layout_column="0" + android:minWidth="150dip"> + </Spinner> + + <EditText + android:id="@+id/page_range_edittext" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="12dip" + android:layout_row="6" + android:layout_column="1" + android:layout_gravity="bottom" + android:selectAllOnFocus="true" + android:minWidth="150dip" + android:hint="@string/pages_range_example" + android:inputType="textNoSuggestions" + android:visibility="gone"> + </EditText> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="12dip" + android:layout_marginRight="12dip" + android:layout_row="5" + android:layout_column="0" + android:text="@string/label_pages" + android:textAppearance="?android:attr/textAppearanceSmall" + android:textStyle="bold" + android:labelFor="@id/range_options_spinner"> + </TextView> + + </GridLayout> + + </ScrollView> + + <Button + android:id="@+id/print_button" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:padding="0dip" + android:text="@string/print_button" + android:background="?android:attr/selectableItemBackground"> + </Button> -</ScrollView> +</LinearLayout> diff --git a/packages/PrintSpooler/res/layout/spinner_dropdown_item.xml b/packages/PrintSpooler/res/layout/spinner_dropdown_item.xml new file mode 100644 index 0000000..66c6724 --- /dev/null +++ b/packages/PrintSpooler/res/layout/spinner_dropdown_item.xml @@ -0,0 +1,48 @@ +<?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="match_parent" + android:layout_height="wrap_content" + android:paddingLeft="8dip" + android:paddingRight="8dip" + android:minHeight="?android:attr/listPreferredItemHeightSmall" + android:orientation="vertical" + android:gravity="center_vertical"> + + <TextView + android:id="@+id/title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="?android:attr/textAppearanceMedium" + android:singleLine="true" + android:ellipsize="end" + android:textIsSelectable="false"> + </TextView> + + <TextView + android:id="@+id/subtitle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="?android:attr/textAppearanceSmall" + android:singleLine="true" + android:ellipsize="end" + android:textIsSelectable="false" + android:visibility="gone"> + + </TextView> + +</LinearLayout> |