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

Commit 105fbcf3 authored by nicolasroard's avatar nicolasroard
Browse files

Fix issues with RTL support

bug:8148068
Change-Id: I869e1a90686c46f8076a66f94040ad03c7c6ca10
parent eccdc428
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -42,7 +42,8 @@
            android:logo="@mipmap/ic_launcher_gallery"
            android:hardwareAccelerated="true"
            android:largeHeap="true"
            android:restoreAnyVersion="true">
            android:restoreAnyVersion="true"
            android:supportsRtl="true">
        <uses-library android:name="com.google.android.media.effects" android:required="false" />
        <activity android:name="com.android.gallery3d.app.MovieActivity"
                android:label="@string/movie_view_label"
+20 −11
Original line number Diff line number Diff line
@@ -102,18 +102,19 @@
                android:layout_gravity="fill_horizontal"
                style="@style/FilterShowSlider" />
    </GridLayout>
    <GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
    <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
                android:columnCount="2"
            android:orientation="horizontal"
            android:layout_marginTop="24dp">


        <ImageButton
            android:id="@+id/gradAddButton"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="left|center_vertical"
            android:layout_gravity="start|center_vertical"
            android:gravity="start"
            android:scaleType="centerInside"
            android:layout_weight="0"
            android:background="@drawable/filtershow_button_background"
@@ -121,16 +122,24 @@
            android:paddingBottom="8dp"
            android:layout_marginLeft="48dp" />

        <View
            android:layout_width="wrap_content"
            android:layout_height="8dp"
            android:layout_weight="1"/>

        <ImageButton
            android:id="@+id/gradDelButton"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="right|center_vertical"
            android:layout_gravity="end|center_vertical"
            android:gravity="end"
            android:scaleType="centerInside"
            android:layout_weight="0"
            android:background="@drawable/filtershow_button_background"
            android:src="@drawable/ic_menu_trash_holo_light"
            android:paddingBottom="8dp"
            android:layout_marginRight="48dp" />
    </GridLayout>

    </LinearLayout>

</LinearLayout>
+2 −2
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@
        android:id="@+id/leftActionButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="left|center_vertical"
        android:layout_gravity="start|center_vertical"
        android:scaleType="centerInside"
        android:layout_weight="0"
        android:background="@drawable/filtershow_button_background"
@@ -44,7 +44,7 @@
        android:id="@+id/rightActionButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="left|center_vertical"
        android:layout_gravity="end|center_vertical"
        android:scaleType="centerInside"
        android:layout_weight="0"
        android:background="@drawable/filtershow_button_background"
+34 −14
Original line number Diff line number Diff line
@@ -166,6 +166,25 @@ public class StateView extends View implements SwipableView {
    }

    private void drawHorizontalPath(float w, float h, float r, float d) {
        if (this.getLayoutDirection() == LAYOUT_DIRECTION_RTL) {
            mPath.moveTo(w, 0);
            if (mType == END) {
                mPath.lineTo(0, 0);
                mPath.lineTo(0, h);
            } else {
                mPath.lineTo(d, 0);
                mPath.lineTo(d, r);
                mPath.lineTo(0, r + d);
                mPath.lineTo(d, r + d + r);
                mPath.lineTo(d, h);
            }
            mPath.lineTo(w, h);
            if (mType != BEGIN) {
                mPath.lineTo(w, r + d + r);
                mPath.lineTo(w - d, r + d);
                mPath.lineTo(w, r);
            }
        } else {
            mPath.moveTo(0, 0);
            if (mType == END) {
                mPath.lineTo(w, 0);
@@ -183,6 +202,7 @@ public class StateView extends View implements SwipableView {
                mPath.lineTo(d, r + d);
                mPath.lineTo(0, r);
            }
        }
        mPath.close();
    }