Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc81bfe3 authored by Svetoslav's avatar Svetoslav Committed by Android (Google) Code Review
Browse files

Merge "RTL support for print UI." into lmp-dev

parents 0421754a 3ab1ec05
Loading
Loading
Loading
Loading
+10 −11
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
**
** Copyright 2008, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License"); 
** 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
**
@@ -23,5 +23,4 @@
    android:singleLine="true"
    android:layout_width="match_parent"
    android:layout_height="?android:attr/dropdownListPreferredItemHeight"
    android:ellipsize="marquee"
    android:textAlignment="inherit"/>
    android:ellipsize="marquee"/>
+1 −1
Original line number Diff line number Diff line
@@ -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">
    </ImageButton>
+7 −2
Original line number Diff line number Diff line
@@ -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();
+1 −1
Original line number Diff line number Diff line
@@ -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);
                }