diff --git a/api/current.txt b/api/current.txt index 23dce934f3b7f..973a9fdcfb0be 100644 --- a/api/current.txt +++ b/api/current.txt @@ -19179,7 +19179,7 @@ package android.print { field public static final android.print.PrintAttributes.MediaSize NA_LETTER; field public static final android.print.PrintAttributes.MediaSize NA_MONARCH; field public static final android.print.PrintAttributes.MediaSize NA_QUARTO; - field public static final android.print.PrintAttributes.MediaSize NA_TBLOID; + field public static final android.print.PrintAttributes.MediaSize NA_TABLOID; field public static final android.print.PrintAttributes.MediaSize OM_DAI_PA_KAI; field public static final android.print.PrintAttributes.MediaSize OM_JUURO_KU_KAI; field public static final android.print.PrintAttributes.MediaSize OM_PA_KAI; diff --git a/core/java/android/print/PrintAttributes.java b/core/java/android/print/PrintAttributes.java index efe6b159d474b..e61fe89653e21 100644 --- a/core/java/android/print/PrintAttributes.java +++ b/core/java/android/print/PrintAttributes.java @@ -391,7 +391,7 @@ public final class PrintAttributes implements Parcelable { public static final MediaSize NA_LEDGER = new MediaSize("NA_LEDGER", "android", R.string.mediaSize_na_ledger, 17000, 11000); /** North America Tabloid media size: 11" x 17" (279mm × 432mm) */ - public static final MediaSize NA_TBLOID = + public static final MediaSize NA_TABLOID = new MediaSize("NA_TABLOID", "android", R.string.mediaSize_na_tabloid, 11000, 17000); /** North America Index Card 3x5 media size: 3" x 5" (76mm x 127mm) */ diff --git a/packages/PrintSpooler/res/color/item_text_color.xml b/packages/PrintSpooler/res/color/item_text_color.xml new file mode 100644 index 0000000000000..f580fbd75577a --- /dev/null +++ b/packages/PrintSpooler/res/color/item_text_color.xml @@ -0,0 +1,20 @@ + + + + + + + \ No newline at end of file diff --git a/packages/PrintSpooler/res/layout/print_job_config_activity_container.xml b/packages/PrintSpooler/res/layout/print_job_config_activity_container.xml index 78170947915c7..98b5cfe164fa1 100644 --- a/packages/PrintSpooler/res/layout/print_job_config_activity_container.xml +++ b/packages/PrintSpooler/res/layout/print_job_config_activity_container.xml @@ -14,10 +14,10 @@ limitations under the License. --> - - + diff --git a/packages/PrintSpooler/res/layout/print_job_config_activity_content_editing.xml b/packages/PrintSpooler/res/layout/print_job_config_activity_content_editing.xml index abf3c03256a27..83019b9ef79a3 100644 --- a/packages/PrintSpooler/res/layout/print_job_config_activity_content_editing.xml +++ b/packages/PrintSpooler/res/layout/print_job_config_activity_content_editing.xml @@ -15,17 +15,16 @@ --> - + android:orientation="vertical"> @@ -37,190 +36,179 @@ android:layout_marginTop="24dip" android:layout_marginStart="24dip" android:layout_marginEnd="24dip" - android:layout_row="0" - android:layout_column="0" - android:layout_columnSpan="2" android:minHeight="?android:attr/listPreferredItemHeightSmall"> - - - - + android:orientation="horizontal" + android:baselineAligned="false"> - - + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + - - + - + + - - + + - - + - + + + + + + + + + + + + + + + + + + + @@ -229,18 +217,14 @@ - + - diff --git a/packages/PrintSpooler/res/layout/spinner_dropdown_item.xml b/packages/PrintSpooler/res/layout/spinner_dropdown_item.xml index 48189bd021e48..f00da0dee060d 100644 --- a/packages/PrintSpooler/res/layout/spinner_dropdown_item.xml +++ b/packages/PrintSpooler/res/layout/spinner_dropdown_item.xml @@ -14,7 +14,7 @@ limitations under the License. --> - + android:textColor="@color/item_text_color" + android:duplicateParentState="true"> + android:textColor="@color/item_text_color" + android:duplicateParentState="true"> diff --git a/packages/PrintSpooler/res/values/constants.xml b/packages/PrintSpooler/res/values/constants.xml index 96cdeb191dfad..e5a9d5d2768c5 100644 --- a/packages/PrintSpooler/res/values/constants.xml +++ b/packages/PrintSpooler/res/values/constants.xml @@ -24,4 +24,6 @@ @integer/page_option_value_page_range + 400dip + \ No newline at end of file diff --git a/packages/PrintSpooler/res/values/styles.xml b/packages/PrintSpooler/res/values/styles.xml index fe11c93a12fc4..f6db6befd9282 100644 --- a/packages/PrintSpooler/res/values/styles.xml +++ b/packages/PrintSpooler/res/values/styles.xml @@ -26,22 +26,14 @@ - - diff --git a/packages/PrintSpooler/src/com/android/printspooler/PrintDialogFrame.java b/packages/PrintSpooler/src/com/android/printspooler/PrintDialogFrame.java new file mode 100644 index 0000000000000..6dd8aa0a6597c --- /dev/null +++ b/packages/PrintSpooler/src/com/android/printspooler/PrintDialogFrame.java @@ -0,0 +1,44 @@ +/* + * 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. + */ + +package com.android.printspooler; + +import android.content.Context; +import android.util.AttributeSet; +import android.widget.FrameLayout; + +public class PrintDialogFrame extends FrameLayout { + + public final int mMaxWidth; + + public PrintDialogFrame(Context context, AttributeSet attrs) { + super(context, attrs); + mMaxWidth = context.getResources().getDimensionPixelSize( + R.dimen.print_dialog_frame_max_width_dip); + } + + @Override + protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + final int widthMode = MeasureSpec.getMode(widthMeasureSpec); + if (widthMode == MeasureSpec.AT_MOST) { + final int receivedWidth = MeasureSpec.getSize(widthMeasureSpec); + final int computedWidth = Math.min(mMaxWidth, receivedWidth); + widthMeasureSpec = MeasureSpec.makeMeasureSpec(computedWidth, + MeasureSpec.EXACTLY); + } + super.onMeasure(widthMeasureSpec, heightMeasureSpec); + } +}