[Android] Make login dialog buttons focusable

Geoffrey Métais git at videolan.org
Fri Oct 13 16:46:31 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Oct 13 16:39:09 2017 +0200| [4d8018a4cc7b50ec004b452bfecde294be04b694] | committer: Geoffrey Métais

Make login dialog buttons focusable

And bring RTL support

> https://code.videolan.org/videolan/vlc-android/commit/4d8018a4cc7b50ec004b452bfecde294be04b694
---

 vlc-android/res/layout/vlc_login_dialog.xml | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/vlc-android/res/layout/vlc_login_dialog.xml b/vlc-android/res/layout/vlc_login_dialog.xml
index 8b98ddc48..9141e0720 100644
--- a/vlc-android/res/layout/vlc_login_dialog.xml
+++ b/vlc-android/res/layout/vlc_login_dialog.xml
@@ -7,10 +7,12 @@
         <variable name="dialog" type="org.videolan.libvlc.Dialog.LoginDialog"/>
         <variable name="handler" type="org.videolan.vlc.gui.dialogs.VlcLoginDialog"/>
     </data>
-    <ScrollView>
+    <ScrollView
+            android:layout_width="match_parent"
+            android:layout_height="match_parent">
         <RelativeLayout
             android:layout_width="match_parent"
-            android:layout_height="match_parent"
+            android:layout_height="wrap_content"
             android:padding="10dp">
 
             <TextView
@@ -76,6 +78,8 @@
                 android:layout_height="wrap_content"
                 android:layout_below="@+id/warning"
                 android:layout_toLeftOf="@+id/action"
+                android:layout_toStartOf="@+id/action"
+                android:focusable="true"
                 android:text="@android:string/cancel"
                 android:onClick="@{handler::onCancel}"
                 tools:targetApi="11"
@@ -85,6 +89,8 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_alignParentRight="true"
+                android:layout_alignParentEnd="true"
+                android:focusable="true"
                 android:layout_below="@+id/warning"
                 android:text="@android:string/ok"
                 android:onClick="@{handler::onLogin}"



More information about the Android mailing list