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

Commit 81598d7a authored by Alan Viverette's avatar Alan Viverette
Browse files

Invert time picker dialog column order when in RTL layout

Bug: 21933765
Change-Id: I39becd18f093ea2d3e9adf8affc9b32dfce19c8e
parent b5a479c1
Loading
Loading
Loading
Loading
+18 −11
Original line number Diff line number Diff line
@@ -17,21 +17,24 @@

<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:layout_width="match_parent"
            android:layout_height="match_parent">
            android:layout_height="match_parent"
            android:layoutDirection="ltr">

    <!-- Provides a background for the time layout that extends into the button bar area. -->
    <View
        android:id="@+id/time_header"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_column="0"
        android:layout_column="@dimen/time_picker_column_start_material"
        android:layout_row="0"
        android:layout_rowSpan="3"
        android:layout_gravity="center|fill" />
        android:layout_gravity="center|fill"
        android:layoutDirection="locale" />

    <RelativeLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_column="0"
        android:layout_column="@dimen/time_picker_column_start_material"
        android:layout_row="1"
        android:layout_gravity="center|fill"
        android:paddingStart="?attr/dialogPreferredPadding"
@@ -83,7 +86,8 @@
            android:layout_height="wrap_content"
            android:layout_below="@+id/time_layout"
            android:layout_centerHorizontal="true"
            android:orientation="vertical">
            android:orientation="vertical"
            android:layoutDirection="locale">

            <CheckedTextView
                android:id="@+id/am_label"
@@ -116,28 +120,31 @@
        android:layout="@layout/alert_dialog_title_material"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_column="1"
        android:layout_column="@dimen/time_picker_column_end_material"
        android:layout_row="0"
        android:layout_gravity="top|fill_horizontal" />
        android:layout_gravity="top|fill_horizontal"
        android:layoutDirection="locale" />

    <android.widget.RadialTimePickerView
        android:id="@+id/radial_picker"
        android:layout_width="@dimen/timepicker_radial_picker_dimen"
        android:layout_height="@dimen/timepicker_radial_picker_dimen"
        android:layout_column="1"
        android:layout_column="@dimen/time_picker_column_end_material"
        android:layout_row="1"
        android:layout_rowWeight="1"
        android:layout_gravity="center|fill"
        android:layout_marginTop="@dimen/timepicker_radial_picker_top_margin"
        android:layout_marginStart="@dimen/timepicker_radial_picker_horizontal_margin"
        android:layout_marginEnd="@dimen/timepicker_radial_picker_horizontal_margin" />
        android:layout_marginEnd="@dimen/timepicker_radial_picker_horizontal_margin"
        android:layoutDirection="locale" />

    <ViewStub
        android:id="@id/buttonPanel"
        android:layout="@layout/alert_dialog_button_bar_material"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_column="1"
        android:layout_column="@dimen/time_picker_column_end_material"
        android:layout_row="2"
        android:layout_gravity="bottom|fill_horizontal" />
        android:layout_gravity="bottom|fill_horizontal"
        android:layoutDirection="locale" />
</GridLayout>
+20 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2015 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.
-->

<resources>
    <item type="dimen" format="integer" name="time_picker_column_start_material">1</item>
    <item type="dimen" format="integer" name="time_picker_column_end_material">0</item>
</resources>
+20 −17
Original line number Diff line number Diff line
@@ -402,4 +402,7 @@
    <dimen name="content_rect_bottom_clip_allowance">20dp</dimen>

    <dimen name="chooser_grid_padding">0dp</dimen>

    <item type="dimen" format="integer" name="time_picker_column_start_material">0</item>
    <item type="dimen" format="integer" name="time_picker_column_end_material">1</item>
</resources>