diff options
Diffstat (limited to 'packages/PrintSpooler/res')
-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 | ||||
-rw-r--r-- | packages/PrintSpooler/res/values/constants.xml (renamed from packages/PrintSpooler/res/menu/print_job_config_activity.xml) | 18 | ||||
-rw-r--r-- | packages/PrintSpooler/res/values/strings.xml | 76 |
4 files changed, 274 insertions, 293 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> diff --git a/packages/PrintSpooler/res/menu/print_job_config_activity.xml b/packages/PrintSpooler/res/values/constants.xml index 149c274..7d2cdc3 100644 --- a/packages/PrintSpooler/res/menu/print_job_config_activity.xml +++ b/packages/PrintSpooler/res/values/constants.xml @@ -13,9 +13,15 @@ See the License for the specific language governing permissions and limitations under the License. --> -<menu xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:id="@+id/print_button" - android:title="@string/print_button" - android:showAsAction="ifRoom"> - </item> -</menu> + +<resources> + + <integer name="page_option_value_all">1</integer> + <integer name="page_option_value_page_range">2</integer> + + <integer-array name="page_options_values" translatable="false"> + <item>@integer/page_option_value_all</item> + <item>@integer/page_option_value_page_range</item> + </integer-array> + +</resources>
\ No newline at end of file diff --git a/packages/PrintSpooler/res/values/strings.xml b/packages/PrintSpooler/res/values/strings.xml index 8b4b40a..de6fb60 100644 --- a/packages/PrintSpooler/res/values/strings.xml +++ b/packages/PrintSpooler/res/values/strings.xml @@ -16,74 +16,44 @@ <resources> - <!-- Title of the PrintSpooler application. [CHAR LIMIT=16] --> + <!-- Title of the PrintSpooler application. [CHAR LIMIT=50] --> <string name="app_label">Print Spooler</string> - <!-- Title of the print dialog. [CHAR LIMIT=10] --> - <string name="print_job_config_dialog_title">Print</string> - <!-- Label of the print dialog's print button. [CHAR LIMIT=16] --> - <string name="print_button">Print</string> - - <!-- Label of the print dialog's cancel button. [CHAR LIMIT=16] --> - <string name="cancel_button">Cancel</string> - - <!-- Label of the destination spinner. [CHAR LIMIT=16] --> - <string name="label_destination">Destination</string> - - <!-- Label of the copies count edit text. [CHAR LIMIT=16] --> - <string name="label_copies">Copies</string> - - <!-- Label of the media size spinner. [CHAR LIMIT=16] --> - <string name="label_media_size">Media size</string> + <string name="print_button">PRINT</string> - <!-- Label of the resolution spinner. [CHAR LIMIT=16] --> - <string name="label_resolution">Resolution</string> + <!-- Label of the destination widget. [CHAR LIMIT=20] --> + <string name="label_destination">DESTIINATION</string> - <!-- Label of the input tray spinner. [CHAR LIMIT=16] --> - <string name="label_input_tray">Input tray</string> + <!-- Label of the copies count widget. [CHAR LIMIT=20] --> + <string name="label_copies">COPIES</string> - <!-- Label of the output tray spinner. [CHAR LIMIT=16] --> - <string name="label_output_tray">Output tray</string> + <!-- Label of the paper size widget. [CHAR LIMIT=20] --> + <string name="label_paper_size">PAPER SIZE</string> - <!-- Label of the duplex mode spinner. [CHAR LIMIT=16] --> - <string name="label_duplex_mode">Duplex mode</string> + <!-- Label of the color mode widget. [CHAR LIMIT=20] --> + <string name="label_color">COLOR</string> - <!-- Label of the color mode spinner. [CHAR LIMIT=16] --> - <string name="label_color_mode">Color mode</string> + <!-- Label of the orientation widget. [CHAR LIMIT=20] --> + <string name="label_orientation">ORIENTATION</string> - <!-- Label of the fitting mode spinner. [CHAR LIMIT=16] --> - <string name="label_fitting_mode">Fitting mode</string> + <!-- Label of the page selection widget. [CHAR LIMIT=20] --> + <string name="label_pages">PAGES</string> - <!-- Label of the orientation spinner. [CHAR LIMIT=16] --> - <string name="label_orientation">Orientation</string> + <!-- Page range exmple used as a hint of how to specify such. [CHAR LIMIT=15] --> + <string name="pages_range_example">e.g. 1–5, 8</string> - <!-- Duplex mode labels. --> - <string-array name="duplex_mode_labels"> - <!-- Duplex mode label: No duplexing. [CHAR LIMIT=20] --> - <item>None</item> - <!-- Duplex mode label: Turn a page along its long edge, e.g. like a book. [CHAR LIMIT=20] --> - <item>Long edge</item> - <!-- Duplex mode label: Turn a page along its short edge, e.g. like a notepad. [CHAR LIMIT=20] --> - <item>Short edge</item> - </string-array> + <!-- Message to notify the user of entering invalid input. [CHAR LIMIT=25] --> + <string name="invalid_input">Invalid input</string> <!-- Color mode labels. --> <string-array name="color_mode_labels"> <!-- Color modelabel: Monochrome color scheme, e.g. one color is used. [CHAR LIMIT=20] --> - <item>Monochrome</item> + <item>Black & White</item> <!-- Color mode label: Color color scheme, e.g. many colors are used. [CHAR LIMIT=20] --> <item>Color</item> </string-array> - <!-- Fitting mode labels. --> - <string-array name="fitting_mode_labels"> - <!-- Fitting mode label: No fitting. [CHAR LIMIT=30] --> - <item>None</item> - <!-- Fitting mode label: Fit the content to the page. [CHAR LIMIT=30] --> - <item>Fit to page</item> - </string-array> - <!-- Orientation labels. --> <string-array name="orientation_labels"> <!-- Orientation label: Portrait page orientation. [CHAR LIMIT=30] --> @@ -92,6 +62,14 @@ <item>Landscape</item> </string-array> + <!-- Page options labels. --> + <string-array name="page_options_labels"> + <!-- Page range option label: Print all pages [CHAR LIMIT=30] --> + <item>All</item> + <!-- Page range option label: Print a page range [CHAR LIMIT=30] --> + <item>Range</item> + </string-array> + <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. --> <string name="permlab_bindPrintSpoolerService">bind to a print spooler service</string> |