From e82ae8eaeda2b7c192d8f2725d5ca2c1194446ba Mon Sep 17 00:00:00 2001 From: sspanak Date: Tue, 28 Feb 2023 18:30:03 +0200 Subject: [PATCH] added right-to-left UI support * added right-to-left support in the Settings and the Add Word dialog * standartized the Add Word dialog layout --- AndroidManifest.xml | 5 +++-- res/layout/addwordview.xml | 41 ++++++++++++++++++++------------------ 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 5bb45821..894f1ef3 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -12,7 +12,8 @@ android:allowBackup="false" android:icon="@drawable/ic_launcher" android:label="@string/app_name" - android:theme="@style/Theme.AppCompat.DayNight"> + android:theme="@style/Theme.AppCompat.DayNight" + android:supportsRtl="true"> @@ -33,6 +34,6 @@ android:excludeFromRecents="true" android:label="@string/add_word_title" android:name="io.github.sspanak.tt9.ui.AddWordAct" - android:theme="@style/Theme.AppCompat.DayNight.Dialog"/> + android:theme="@style/Theme.AppCompat.DayNight.Dialog.MinWidth"/> diff --git a/res/layout/addwordview.xml b/res/layout/addwordview.xml index c148c5fb..05011785 100644 --- a/res/layout/addwordview.xml +++ b/res/layout/addwordview.xml @@ -1,7 +1,7 @@ @@ -10,39 +10,42 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginVertical="4dp" + android:layout_marginStart="10dp" + android:layout_marginTop="10dp" + android:layout_marginEnd="10dp" android:hint="@string/add_word_field_placeholder" - android:inputType="text" android:imeOptions="actionSend" - android:privateImeOptions="io.github.sspanak.tt9.addword=true" - android:importantForAutofill="no"> + android:importantForAutofill="no" + android:inputType="text" + android:maxWidth="480dp" + android:minHeight="48dp" + android:privateImeOptions="io.github.sspanak.tt9.addword=true"> - - -