[Android] Fix TV add to playlist edit text focus and style

Nicolas Pomepuy git at videolan.org
Mon Apr 3 14:30:37 UTC 2023


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Mar 16 15:09:15 2023 +0100| [c121712f0f2cef82c6eca1910c20a81d7814458e] | committer: Duncan McNamara

Fix TV add to playlist edit text focus and style

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

 application/vlc-android/res/layout/dialog_playlist.xml                 | 3 ++-
 .../vlc-android/src/org/videolan/vlc/gui/dialogs/SavePlaylistDialog.kt | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/application/vlc-android/res/layout/dialog_playlist.xml b/application/vlc-android/res/layout/dialog_playlist.xml
index 6c7b537007..92ab69b2da 100644
--- a/application/vlc-android/res/layout/dialog_playlist.xml
+++ b/application/vlc-android/res/layout/dialog_playlist.xml
@@ -58,10 +58,11 @@
                     android:layout_marginTop="8dp"
                     android:layout_marginEnd="8dp"
                     app:layout_constraintEnd_toStartOf="@+id/dialog_playlist_save"
+                        style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
                     app:layout_constraintStart_toStartOf="parent"
                     app:layout_constraintTop_toBottomOf="@+id/medias2">
 
-                <EditText
+                <com.google.android.material.textfield.TextInputEditText
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
                         android:layout_alignParentTop="true"
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/dialogs/SavePlaylistDialog.kt b/application/vlc-android/src/org/videolan/vlc/gui/dialogs/SavePlaylistDialog.kt
index 486ad3eca1..d4474c9ffa 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/dialogs/SavePlaylistDialog.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/dialogs/SavePlaylistDialog.kt
@@ -89,7 +89,7 @@ class SavePlaylistDialog : VLCBottomSheetDialogFragment(), View.OnClickListener,
     private val coroutineContextProvider: CoroutineContextProvider
     private val alreadyAdding = AtomicBoolean(false)
 
-    override fun initialFocusedView(): View = binding.dialogPlaylistName
+    override fun initialFocusedView(): View = binding.dialogPlaylistName.editText ?: binding.dialogPlaylistName
 
     init {
         SavePlaylistDialog.registerCreator { CoroutineContextProvider() }



More information about the Android mailing list