[Android] Fix VlcDialog crash on orientation change

Nicolas Pomepuy git at videolan.org
Wed Nov 18 13:05:11 CET 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Tue Nov 17 06:59:16 2020 +0100| [1d82c851cd84e2db456ad134e2d9b1f1b23cf8fa] | committer: Nicolas Pomepuy

Fix VlcDialog crash on orientation change

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

 application/vlc-android/src/org/videolan/vlc/gui/dialogs/VlcDialog.kt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/dialogs/VlcDialog.kt b/application/vlc-android/src/org/videolan/vlc/gui/dialogs/VlcDialog.kt
index dfc9891e3..8eceadabc 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/dialogs/VlcDialog.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/dialogs/VlcDialog.kt
@@ -49,6 +49,7 @@ abstract class VlcDialog<T : Dialog, B : ViewDataBinding> : DialogFragment() {
     }
 
     override fun onCreateDialog(savedInstanceState: Bundle?): android.app.Dialog {
+        retainInstance = true
         val dialog = AppCompatDialog(activity, theme)
         dialog.setCancelable(true)
         dialog.setCanceledOnTouchOutside(true)



More information about the Android mailing list