[Android] Close the keyboard when creating a playlist

Nicolas Pomepuy git at videolan.org
Mon May 13 09:34:41 UTC 2024


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon May 13 09:54:10 2024 +0200| [ed9d3a40c597d83555b8afdcd73b914b1502fdc3] | committer: Duncan McNamara

Close the keyboard when creating a playlist

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

 .../vlc-android/src/org/videolan/vlc/gui/dialogs/SavePlaylistDialog.kt  | 2 ++
 1 file changed, 2 insertions(+)

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 6de80c6afb..562b26a8e2 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
@@ -53,6 +53,7 @@ import org.videolan.vlc.gui.dialogs.DuplicationWarningDialog.Companion.CANCEL
 import org.videolan.vlc.gui.dialogs.DuplicationWarningDialog.Companion.NO_OPTION
 import org.videolan.vlc.gui.dialogs.DuplicationWarningDialog.Companion.OPTION_KEY
 import org.videolan.vlc.gui.dialogs.DuplicationWarningDialog.Companion.REQUEST_KEY
+import org.videolan.vlc.gui.helpers.UiTools
 import org.videolan.vlc.gui.helpers.UiTools.showPinIfNeeded
 import org.videolan.vlc.providers.FileBrowserProvider
 import org.videolan.vlc.viewmodels.browser.TYPE_FILE
@@ -235,6 +236,7 @@ class SavePlaylistDialog : VLCBottomSheetDialogFragment(), View.OnClickListener,
         if (alreadyAdding.getAndSet(true)) return
         val name = binding.dialogPlaylistName.editText?.text?.toString()?.trim { it <= ' ' }
                 ?: return
+        UiTools.setKeyboardVisibility(binding.dialogPlaylistName, false)
         lifecycleScope.launch {
             withContext(Dispatchers.IO) { medialibrary.getPlaylistByName(name) }?.let {
                 binding.dialogPlaylistName.error = getString(R.string.playlist_existing, it.title)



More information about the Android mailing list