diff --git a/core/res/res/layout/simple_spinner_dropdown_item.xml b/core/res/res/layout/simple_spinner_dropdown_item.xml index e2bd474dda9e1..f276cfaa2a685 100644 --- a/core/res/res/layout/simple_spinner_dropdown_item.xml +++ b/core/res/res/layout/simple_spinner_dropdown_item.xml @@ -4,24 +4,23 @@ ** ** Copyright 2008, 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 +** 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 +** 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 +** 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. */ --> - + android:ellipsize="marquee"/> diff --git a/packages/PrintSpooler/res/layout/print_activity.xml b/packages/PrintSpooler/res/layout/print_activity.xml index 30b9629249db4..6b8aa47b2fd63 100644 --- a/packages/PrintSpooler/res/layout/print_activity.xml +++ b/packages/PrintSpooler/res/layout/print_activity.xml @@ -98,7 +98,7 @@ android:id="@+id/print_button" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginEnd="16dip" + android:layout_marginStart="16dip" android:elevation="@dimen/preview_controls_elevation" android:background="@drawable/print_button"> diff --git a/packages/PrintSpooler/src/com/android/printspooler/widget/PrintContentView.java b/packages/PrintSpooler/src/com/android/printspooler/widget/PrintContentView.java index c84b06a09ca57..970e3c05a2c7d 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/widget/PrintContentView.java +++ b/packages/PrintSpooler/src/com/android/printspooler/widget/PrintContentView.java @@ -283,8 +283,13 @@ public final class PrintContentView extends ViewGroup implements View.OnClickLis mDynamicContent.layout(left, dynContentTop, right, dynContentBottom); MarginLayoutParams params = (MarginLayoutParams) mPrintButton.getLayoutParams(); - final int rightMargin = params.rightMargin; - final int printButtonLeft = right - mPrintButton.getMeasuredWidth() - rightMargin; + + final int printButtonLeft; + if (getLayoutDirection() == View.LAYOUT_DIRECTION_LTR) { + printButtonLeft = right - mPrintButton.getMeasuredWidth() - params.getMarginStart(); + } else { + printButtonLeft = left + params.getMarginStart(); + } final int printButtonTop = dynContentBottom - mPrintButton.getMeasuredHeight() / 2; final int printButtonRight = printButtonLeft + mPrintButton.getMeasuredWidth(); final int printButtonBottom = printButtonTop + mPrintButton.getMeasuredHeight(); diff --git a/packages/PrintSpooler/src/com/android/printspooler/widget/PrintOptionsLayout.java b/packages/PrintSpooler/src/com/android/printspooler/widget/PrintOptionsLayout.java index 71f4aa71d9c2d..7a80a8bd426e8 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/widget/PrintOptionsLayout.java +++ b/packages/PrintSpooler/src/com/android/printspooler/widget/PrintOptionsLayout.java @@ -89,7 +89,7 @@ public final class PrintOptionsLayout extends ViewGroup { columnWidth - childParams.getMarginStart() - childParams.getMarginEnd(), MeasureSpec.EXACTLY); } else { - childWidthMeasureSpec = getChildMeasureSpec(heightMeasureSpec, + childWidthMeasureSpec = getChildMeasureSpec(widthMeasureSpec, getPaddingStart() + getPaddingEnd() + width, childParams.width); }