adding some RTL layout improvements

This commit is contained in:
tibbi 2020-09-19 11:47:57 +02:00
parent 31e9f5b48c
commit 128f6e52fd
2 changed files with 51 additions and 48 deletions

View File

@ -64,7 +64,7 @@ android {
}
dependencies {
implementation 'com.simplemobiletools:commons:5.30.11'
implementation 'com.simplemobiletools:commons:5.30.12'
implementation 'joda-time:joda-time:2.10.1'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/event_scrollview"
@ -25,7 +24,7 @@
android:maxLines="1"
android:minEms="20"
android:textCursorDrawable="@null"
android:textSize="@dimen/day_text_size"/>
android:textSize="@dimen/day_text_size" />
<com.simplemobiletools.commons.views.MyEditText
android:id="@+id/event_location"
@ -41,7 +40,7 @@
android:maxLines="1"
android:minEms="20"
android:textCursorDrawable="@null"
android:textSize="@dimen/day_text_size"/>
android:textSize="@dimen/day_text_size" />
<ImageView
android:id="@+id/event_show_on_map"
@ -54,7 +53,7 @@
android:background="?attr/selectableItemBackgroundBorderless"
android:paddingStart="@dimen/small_margin"
android:paddingEnd="@dimen/small_margin"
android:src="@drawable/ic_place_vector"/>
android:src="@drawable/ic_place_vector" />
<com.simplemobiletools.commons.views.MyEditText
android:id="@+id/event_description"
@ -71,7 +70,7 @@
android:linksClickable="true"
android:minEms="20"
android:textCursorDrawable="@null"
android:textSize="@dimen/day_text_size"/>
android:textSize="@dimen/day_text_size" />
<ImageView
android:id="@+id/event_description_divider"
@ -81,7 +80,7 @@
android:layout_marginTop="@dimen/activity_margin"
android:layout_marginBottom="@dimen/normal_margin"
android:background="@color/divider_grey"
android:importantForAccessibility="no"/>
android:importantForAccessibility="no" />
<ImageView
android:id="@+id/event_time_image"
@ -92,7 +91,7 @@
android:layout_alignBottom="@+id/event_all_day"
android:layout_marginStart="@dimen/normal_margin"
android:padding="@dimen/medium_margin"
android:src="@drawable/ic_clock_vector"/>
android:src="@drawable/ic_clock_vector" />
<com.simplemobiletools.commons.views.MySwitchCompat
android:id="@+id/event_all_day"
@ -107,7 +106,7 @@
android:paddingBottom="@dimen/normal_margin"
android:text="@string/all_day"
android:textSize="@dimen/day_text_size"
app:switchPadding="@dimen/small_margin"/>
app:switchPadding="@dimen/small_margin" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/event_start_date"
@ -120,7 +119,7 @@
android:paddingEnd="@dimen/activity_margin"
android:paddingBottom="@dimen/activity_margin"
android:textSize="@dimen/day_text_size"
tools:text="January 1 1970"/>
tools:text="January 1 1970" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/event_start_time"
@ -131,7 +130,7 @@
android:background="?attr/selectableItemBackground"
android:padding="@dimen/activity_margin"
android:textSize="@dimen/day_text_size"
tools:text="00:00"/>
tools:text="00:00" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/event_end_date"
@ -144,7 +143,7 @@
android:paddingEnd="@dimen/activity_margin"
android:paddingBottom="@dimen/activity_margin"
android:textSize="@dimen/day_text_size"
tools:text="January 1 1970"/>
tools:text="January 1 1970" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/event_end_time"
@ -155,34 +154,34 @@
android:background="?attr/selectableItemBackground"
android:padding="@dimen/activity_margin"
android:textSize="@dimen/day_text_size"
tools:text="00:00"/>
tools:text="00:00" />
<ImageView
android:id="@+id/event_time_zone_image"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_below="@+id/event_end_date"
android:layout_marginStart="@dimen/normal_margin"
android:layout_alignTop="@+id/event_time_zone"
android:layout_alignBottom="@+id/event_time_zone"
android:layout_marginStart="@dimen/normal_margin"
android:padding="@dimen/medium_margin"
android:src="@drawable/ic_globe_vector"/>
android:src="@drawable/ic_globe_vector" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/event_time_zone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/event_end_date"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/small_margin"
android:layout_toEndOf="@+id/event_time_zone_image"
android:background="?attr/selectableItemBackground"
android:layout_centerVertical="true"
android:ellipsize="end"
android:lines="1"
android:paddingTop="@dimen/activity_margin"
android:paddingBottom="@dimen/activity_margin"
android:textSize="@dimen/day_text_size"
tools:text="Europe/Bratislava"/>
tools:text="Europe/Bratislava" />
<ImageView
android:id="@+id/event_date_time_divider"
@ -192,7 +191,7 @@
android:layout_marginTop="@dimen/medium_margin"
android:layout_marginBottom="@dimen/medium_margin"
android:background="@color/divider_grey"
android:importantForAccessibility="no"/>
android:importantForAccessibility="no" />
<ImageView
android:id="@+id/event_reminder_image"
@ -203,7 +202,7 @@
android:layout_alignBottom="@+id/event_reminder_1"
android:layout_marginStart="@dimen/normal_margin"
android:padding="@dimen/medium_margin"
android:src="@drawable/ic_bell_vector"/>
android:src="@drawable/ic_bell_vector" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/event_reminder_1"
@ -217,9 +216,10 @@
android:ellipsize="end"
android:lines="1"
android:paddingTop="@dimen/activity_margin"
android:paddingEnd="@dimen/activity_margin"
android:paddingBottom="@dimen/activity_margin"
android:textSize="@dimen/day_text_size"
tools:text="@string/add_another_reminder"/>
tools:text="@string/add_another_reminder" />
<ImageView
android:id="@+id/event_reminder_1_type"
@ -231,7 +231,7 @@
android:layout_marginStart="@dimen/small_margin"
android:background="?attr/selectableItemBackground"
android:padding="@dimen/activity_margin"
android:src="@drawable/ic_bell_vector"/>
android:src="@drawable/ic_bell_vector" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/event_reminder_2"
@ -245,11 +245,12 @@
android:ellipsize="end"
android:lines="1"
android:paddingTop="@dimen/activity_margin"
android:paddingEnd="@dimen/activity_margin"
android:paddingBottom="@dimen/activity_margin"
android:text="@string/add_another_reminder"
android:textSize="@dimen/day_text_size"
android:visibility="gone"
tools:text="@string/add_another_reminder"/>
tools:text="@string/add_another_reminder" />
<ImageView
android:id="@+id/event_reminder_2_type"
@ -261,7 +262,7 @@
android:layout_marginStart="@dimen/small_margin"
android:background="?attr/selectableItemBackground"
android:padding="@dimen/activity_margin"
android:src="@drawable/ic_bell_vector"/>
android:src="@drawable/ic_bell_vector" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/event_reminder_3"
@ -275,11 +276,12 @@
android:ellipsize="end"
android:lines="1"
android:paddingTop="@dimen/activity_margin"
android:paddingEnd="@dimen/activity_margin"
android:paddingBottom="@dimen/activity_margin"
android:text="@string/add_another_reminder"
android:textSize="@dimen/day_text_size"
android:visibility="gone"
tools:text="@string/add_another_reminder"/>
tools:text="@string/add_another_reminder" />
<ImageView
android:id="@+id/event_reminder_3_type"
@ -291,7 +293,7 @@
android:layout_marginStart="@dimen/small_margin"
android:background="?attr/selectableItemBackground"
android:padding="@dimen/activity_margin"
android:src="@drawable/ic_bell_vector"/>
android:src="@drawable/ic_bell_vector" />
<ImageView
android:id="@+id/event_reminder_divider"
@ -301,7 +303,7 @@
android:layout_marginTop="@dimen/medium_margin"
android:layout_marginBottom="@dimen/medium_margin"
android:background="@color/divider_grey"
android:importantForAccessibility="no"/>
android:importantForAccessibility="no" />
<ImageView
android:id="@+id/event_repetition_image"
@ -312,7 +314,7 @@
android:layout_alignBottom="@+id/event_repetition"
android:layout_marginStart="@dimen/normal_margin"
android:padding="@dimen/medium_margin"
android:src="@drawable/ic_repeat_vector"/>
android:src="@drawable/ic_repeat_vector" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/event_repetition"
@ -323,9 +325,10 @@
android:layout_toEndOf="@+id/event_repetition_image"
android:background="?attr/selectableItemBackground"
android:paddingTop="@dimen/normal_margin"
android:paddingEnd="@dimen/activity_margin"
android:paddingBottom="@dimen/normal_margin"
android:textSize="@dimen/day_text_size"
tools:text="@string/no_repetition"/>
tools:text="@string/no_repetition" />
<RelativeLayout
android:id="@+id/event_repetition_rule_holder"
@ -344,7 +347,7 @@
android:paddingTop="@dimen/activity_margin"
android:paddingBottom="@dimen/activity_margin"
android:text="@string/repeat_on"
android:textSize="@dimen/day_text_size"/>
android:textSize="@dimen/day_text_size" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/event_repetition_rule"
@ -356,7 +359,7 @@
android:gravity="end"
android:padding="@dimen/activity_margin"
android:text="@string/every_day"
android:textSize="@dimen/day_text_size"/>
android:textSize="@dimen/day_text_size" />
</RelativeLayout>
<RelativeLayout
@ -377,7 +380,7 @@
android:paddingTop="@dimen/activity_margin"
android:paddingBottom="@dimen/activity_margin"
android:text="@string/repeat_till"
android:textSize="@dimen/day_text_size"/>
android:textSize="@dimen/day_text_size" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/event_repetition_limit"
@ -387,7 +390,7 @@
android:clickable="false"
android:padding="@dimen/activity_margin"
android:text="@string/forever"
android:textSize="@dimen/day_text_size"/>
android:textSize="@dimen/day_text_size" />
</RelativeLayout>
<ImageView
@ -397,7 +400,7 @@
android:layout_below="@+id/event_repetition_limit_holder"
android:layout_marginTop="@dimen/medium_margin"
android:background="@color/divider_grey"
android:importantForAccessibility="no"/>
android:importantForAccessibility="no" />
<ImageView
android:id="@+id/event_attendees_image"
@ -408,7 +411,7 @@
android:layout_marginStart="@dimen/normal_margin"
android:layout_marginTop="@dimen/small_margin"
android:padding="@dimen/medium_margin"
android:src="@drawable/ic_people_vector"/>
android:src="@drawable/ic_people_vector" />
<LinearLayout
android:id="@+id/event_attendees_holder"
@ -417,7 +420,7 @@
android:layout_below="@+id/event_repetition_divider"
android:layout_marginTop="@dimen/medium_margin"
android:layout_toEndOf="@+id/event_attendees_image"
android:orientation="vertical"/>
android:orientation="vertical" />
<ImageView
android:id="@+id/event_attendees_divider"
@ -426,7 +429,7 @@
android:layout_below="@+id/event_attendees_holder"
android:layout_marginTop="@dimen/medium_margin"
android:background="@color/divider_grey"
android:importantForAccessibility="no"/>
android:importantForAccessibility="no" />
<ImageView
android:id="@+id/event_caldav_calendar_image"
@ -434,12 +437,12 @@
android:layout_height="match_parent"
android:layout_below="@+id/event_attendees_divider"
android:layout_alignTop="@+id/event_caldav_calendar_holder"
android:layout_alignBottom="@+id/event_caldav_calendar_holder"
android:layout_alignEnd="@+id/event_time_image"
android:layout_alignBottom="@+id/event_caldav_calendar_holder"
android:layout_marginStart="@dimen/normal_margin"
android:padding="@dimen/medium_margin"
android:src="@drawable/ic_calendar_vector"
android:visibility="gone"/>
android:visibility="gone" />
<RelativeLayout
android:id="@+id/event_caldav_calendar_holder"
@ -459,10 +462,10 @@
android:ellipsize="end"
android:maxLines="1"
android:paddingTop="@dimen/medium_margin"
android:paddingEnd="@dimen/medium_margin"
android:paddingEnd="@dimen/activity_margin"
android:paddingBottom="@dimen/tiny_margin"
android:textSize="@dimen/day_text_size"
tools:text="My calendar"/>
tools:text="My calendar" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/event_caldav_calendar_email"
@ -476,7 +479,7 @@
android:paddingEnd="@dimen/medium_margin"
android:paddingBottom="@dimen/medium_margin"
android:textSize="@dimen/meta_text_size"
tools:text="hello@simplemobiletools.com"/>
tools:text="hello@simplemobiletools.com" />
<ImageView
android:id="@+id/event_caldav_calendar_color"
@ -485,7 +488,7 @@
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/activity_margin"
android:clickable="false"/>
android:clickable="false" />
</RelativeLayout>
@ -496,7 +499,7 @@
android:layout_below="@+id/event_caldav_calendar_holder"
android:background="@color/divider_grey"
android:importantForAccessibility="no"
android:visibility="gone"/>
android:visibility="gone" />
<ImageView
android:id="@+id/event_type_image"
@ -507,7 +510,7 @@
android:layout_alignBottom="@+id/event_type_holder"
android:layout_marginStart="@dimen/normal_margin"
android:padding="@dimen/medium_margin"
android:src="@drawable/ic_color_vector"/>
android:src="@drawable/ic_color_vector" />
<RelativeLayout
android:id="@+id/event_type_holder"
@ -528,7 +531,7 @@
android:layout_toStartOf="@+id/event_type_color"
android:paddingTop="@dimen/normal_margin"
android:paddingBottom="@dimen/normal_margin"
android:textSize="@dimen/day_text_size"/>
android:textSize="@dimen/day_text_size" />
<ImageView
android:id="@+id/event_type_color"
@ -537,7 +540,7 @@
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/activity_margin"
android:clickable="false"/>
android:clickable="false" />
</RelativeLayout>
@ -547,6 +550,6 @@
android:layout_height="1px"
android:layout_below="@+id/event_type_holder"
android:background="@color/divider_grey"
android:importantForAccessibility="no"/>
android:importantForAccessibility="no" />
</RelativeLayout>
</ScrollView>