summaryrefslogtreecommitdiffstats
path: root/packages/PrintSpooler/res/layout
diff options
context:
space:
mode:
authorSvetoslav Ganov <svetoslavganov@google.com>2013-08-06 14:40:46 -0700
committerSvetoslav Ganov <svetoslavganov@google.com>2013-08-06 15:07:17 -0700
commit14db9654f6c31e94fe9272776f1f1b8602a17fdc (patch)
treefad51f4badc7de342f4b32a3b246e76febed4a33 /packages/PrintSpooler/res/layout
parent614b4c4cd42699161b0c801117416ec517b2afe2 (diff)
downloadframeworks_base-14db9654f6c31e94fe9272776f1f1b8602a17fdc.zip
frameworks_base-14db9654f6c31e94fe9272776f1f1b8602a17fdc.tar.gz
frameworks_base-14db9654f6c31e94fe9272776f1f1b8602a17fdc.tar.bz2
Print UI polish (a.k.a. just the next iteration))
1. Added a dialog to show a spinner while the app is writing the printed content. 2. Fixed print job config acitivity leaking. 3. Updated the notifications a bit. Change-Id: I8314390135a49605ee11ab4ed14b210a29566745
Diffstat (limited to 'packages/PrintSpooler/res/layout')
-rw-r--r--packages/PrintSpooler/res/layout/generating_print_job_dialog.xml24
-rw-r--r--packages/PrintSpooler/res/layout/print_job_config_activity.xml528
2 files changed, 289 insertions, 263 deletions
diff --git a/packages/PrintSpooler/res/layout/generating_print_job_dialog.xml b/packages/PrintSpooler/res/layout/generating_print_job_dialog.xml
new file mode 100644
index 0000000..360f843
--- /dev/null
+++ b/packages/PrintSpooler/res/layout/generating_print_job_dialog.xml
@@ -0,0 +1,24 @@
+<?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.
+-->
+
+<ProgressBar xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/progress"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="16dip"
+ android:layout_gravity="center_horizontal"
+ style="?android:attr/progressBarStyleLarge">
+</ProgressBar>
diff --git a/packages/PrintSpooler/res/layout/print_job_config_activity.xml b/packages/PrintSpooler/res/layout/print_job_config_activity.xml
index a4105ea..1a8b0f1 100644
--- a/packages/PrintSpooler/res/layout/print_job_config_activity.xml
+++ b/packages/PrintSpooler/res/layout/print_job_config_activity.xml
@@ -14,274 +14,276 @@
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:orientation="vertical"
- android:scrollbars="vertical">
+ android:orientation="vertical">
- <GridLayout
- android:layout_width="wrap_content"
+ <ScrollView
+ android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
- android:columnCount="2">
+ android:scrollbars="vertical">
- <!-- Destination -->
-
- <Spinner
- android:id="@+id/destination_spinner"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="fill_horizontal"
- android:layout_marginLeft="32dip"
- android:layout_marginTop="32dip"
- android:layout_marginRight="32dip"
- android:layout_marginBottom="12dip"
- android:layout_row="0"
- android:layout_column="0"
- android:layout_columnSpan="2"
- android:minHeight="?android:attr/listPreferredItemHeight">
- </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_marginLeft="32dip"
- 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"
- android:minHeight="?android:attr/listPreferredItemHeight">
- </view>
-
- <TextView
+ <GridLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginLeft="32dip"
- 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_marginRight="32dip"
- android:layout_marginBottom="12dip"
- android:layout_row="2"
- android:layout_column="1"
- android:minWidth="150dip"
- android:minHeight="?android:attr/listPreferredItemHeight">
- </Spinner>
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginLeft="12dip"
- android:layout_marginRight="32dip"
- 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_marginLeft="32dip"
- android:layout_marginRight="12dip"
- android:layout_marginBottom="12dip"
- android:layout_row="4"
- android:layout_column="0"
- android:minWidth="150dip"
- android:minHeight="?android:attr/listPreferredItemHeight">
- </Spinner>
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginLeft="32dip"
- 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_marginRight="32dip"
- android:layout_marginBottom="12dip"
- android:layout_row="4"
- android:layout_column="1"
- android:minWidth="150dip"
- android:minHeight="?android:attr/listPreferredItemHeight">
- </Spinner>
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginLeft="12dip"
- android:layout_marginTop="12dip"
- android:layout_marginRight="32dip"
- 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_marginLeft="32dip"
- android:layout_marginRight="12dip"
- android:layout_row="6"
- android:layout_column="0"
- android:minWidth="150dip"
- android:minHeight="?android:attr/listPreferredItemHeight">
- </Spinner>
-
- <view
- class="com.android.printspooler.PrintJobConfigActivity$CustomEditText"
- android:id="@+id/page_range_edittext"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginLeft="12dip"
- android:layout_marginRight="32dip"
- 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"
- android:minHeight="?android:attr/listPreferredItemHeight">
- </view>
-
- <TextView
- android:id="@+id/page_range_title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginLeft="32dip"
- 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>
-
- <!-- Print pereview -->
-
- <ImageView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="fill_horizontal"
- android:layout_marginLeft="32dip"
- android:layout_marginTop="32dip"
- android:layout_marginRight="32dip"
- android:layout_row="7"
- android:layout_column="0"
- android:layout_columnSpan="2"
- android:background="?android:attr/listDivider"
- android:contentDescription="@null">
- </ImageView>
-
- <Button
- android:id="@+id/print_preview_button"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="fill_horizontal"
- android:layout_marginLeft="32dip"
- android:layout_marginRight="32dip"
- android:layout_row="8"
- android:layout_column="0"
- android:layout_columnSpan="2"
- android:text="@string/print_preview"
- android:gravity="left|center_vertical"
- android:background="?android:attr/selectableItemBackground"
- android:minHeight="?android:attr/listPreferredItemHeight">
- </Button>
-
- <ImageView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="fill_horizontal"
- android:layout_marginLeft="32dip"
- android:layout_marginRight="32dip"
- android:layout_marginBottom="32dip"
- android:layout_row="9"
- android:layout_column="0"
- android:layout_columnSpan="2"
- android:background="?android:attr/listDivider"
- android:contentDescription="@null">
- </ImageView>
-
- <ImageView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="fill_horizontal"
- android:layout_row="10"
- android:layout_column="0"
- android:layout_columnSpan="2"
- android:background="?android:attr/listDivider"
- android:contentDescription="@null">
- </ImageView>
-
- <Button
- android:id="@+id/print_button"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="fill_horizontal"
- android:layout_row="11"
- android:layout_column="0"
- android:layout_columnSpan="2"
- android:padding="0dip"
- android:text="@string/print_button"
- android:background="?android:attr/selectableItemBackground"
- android:minHeight="?android:attr/listPreferredItemHeight">
- </Button>
-
- </GridLayout>
-
-</ScrollView>
+ 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_gravity="fill_horizontal"
+ android:layout_marginLeft="32dip"
+ android:layout_marginTop="32dip"
+ android:layout_marginRight="32dip"
+ android:layout_marginBottom="12dip"
+ android:layout_row="0"
+ android:layout_column="0"
+ android:layout_columnSpan="2"
+ android:minHeight="?android:attr/listPreferredItemHeight">
+ </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_marginLeft="32dip"
+ 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"
+ android:minHeight="?android:attr/listPreferredItemHeight">
+ </view>
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="32dip"
+ 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_marginRight="32dip"
+ android:layout_marginBottom="12dip"
+ android:layout_row="2"
+ android:layout_column="1"
+ android:minWidth="150dip"
+ android:minHeight="?android:attr/listPreferredItemHeight">
+ </Spinner>
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="12dip"
+ android:layout_marginRight="32dip"
+ 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_marginLeft="32dip"
+ android:layout_marginRight="12dip"
+ android:layout_marginBottom="12dip"
+ android:layout_row="4"
+ android:layout_column="0"
+ android:minWidth="150dip"
+ android:minHeight="?android:attr/listPreferredItemHeight">
+ </Spinner>
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="32dip"
+ 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_marginRight="32dip"
+ android:layout_marginBottom="12dip"
+ android:layout_row="4"
+ android:layout_column="1"
+ android:minWidth="150dip"
+ android:minHeight="?android:attr/listPreferredItemHeight">
+ </Spinner>
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="12dip"
+ android:layout_marginTop="12dip"
+ android:layout_marginRight="32dip"
+ 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_marginLeft="32dip"
+ android:layout_marginRight="12dip"
+ android:layout_row="6"
+ android:layout_column="0"
+ android:minWidth="150dip"
+ android:minHeight="?android:attr/listPreferredItemHeight">
+ </Spinner>
+
+ <view
+ class="com.android.printspooler.PrintJobConfigActivity$CustomEditText"
+ android:id="@+id/page_range_edittext"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="12dip"
+ android:layout_marginRight="32dip"
+ 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"
+ android:minHeight="?android:attr/listPreferredItemHeight">
+ </view>
+
+ <TextView
+ android:id="@+id/page_range_title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="32dip"
+ 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>
+
+ <!-- Print pereview -->
+
+ <ImageView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="fill_horizontal"
+ android:layout_marginLeft="32dip"
+ android:layout_marginTop="32dip"
+ android:layout_marginRight="32dip"
+ android:layout_row="7"
+ android:layout_column="0"
+ android:layout_columnSpan="2"
+ android:background="?android:attr/listDivider"
+ android:contentDescription="@null">
+ </ImageView>
+
+ <Button
+ android:id="@+id/print_preview_button"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="fill_horizontal"
+ android:layout_marginLeft="32dip"
+ android:layout_marginRight="32dip"
+ android:layout_row="8"
+ android:layout_column="0"
+ android:layout_columnSpan="2"
+ android:text="@string/print_preview"
+ android:gravity="left|center_vertical"
+ android:background="?android:attr/selectableItemBackground"
+ android:minHeight="?android:attr/listPreferredItemHeight">
+ </Button>
+
+ <ImageView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="fill_horizontal"
+ android:layout_marginLeft="32dip"
+ android:layout_marginRight="32dip"
+ android:layout_marginBottom="32dip"
+ android:layout_row="9"
+ android:layout_column="0"
+ android:layout_columnSpan="2"
+ android:background="?android:attr/listDivider"
+ android:contentDescription="@null">
+ </ImageView>
+
+ <ImageView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="fill_horizontal"
+ android:layout_row="10"
+ android:layout_column="0"
+ android:layout_columnSpan="2"
+ android:background="?android:attr/listDivider"
+ android:contentDescription="@null">
+ </ImageView>
+
+ </GridLayout>
+
+ </ScrollView>
+
+ <Button
+ android:id="@+id/print_button"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="fill_horizontal"
+ android:text="@string/print_button"
+ style="?android:attr/buttonBarButtonStyle">
+ </Button>
+
+</LinearLayout>