[Android] Add a way to show the what's new dialog again

Nicolas Pomepuy git at videolan.org
Fri Dec 8 11:43:14 UTC 2023


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Fri Dec  8 12:34:09 2023 +0100| [6fdf9e22483776daa6c58a4fd77fccfeb0cc0108] | committer: Nicolas Pomepuy

Add a way to show the what's new dialog again

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

 application/vlc-android/res/layout/dialog_about_version.xml | 13 ++++++++++++-
 .../src/org/videolan/vlc/gui/dialogs/AboutVersionDialog.kt  |  5 +++++
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/application/vlc-android/res/layout/dialog_about_version.xml b/application/vlc-android/res/layout/dialog_about_version.xml
index 92b5ee196c..d4b015140d 100644
--- a/application/vlc-android/res/layout/dialog_about_version.xml
+++ b/application/vlc-android/res/layout/dialog_about_version.xml
@@ -50,6 +50,17 @@
                     app:layout_constraintTop_toBottomOf="@+id/medias2"
                     tools:text="* Bug fixes\n*Crash fixes" />
 
+            <Button
+                    android:id="@+id/moreButton"
+                    style="@style/Widget.MaterialComponents.Button.TextButton.Dialog"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="8dp"
+                    android:layout_marginEnd="16dp"
+                    android:text="@string/more"
+                    app:layout_constraintEnd_toEndOf="parent"
+                    app:layout_constraintTop_toBottomOf="@+id/changelog" />
+
             <TextView
                     android:id="@+id/textView28"
                     android:layout_width="wrap_content"
@@ -59,7 +70,7 @@
                     android:text="@string/revision"
                     android:textColor="?attr/font_light"
                     app:layout_constraintStart_toStartOf="parent"
-                    app:layout_constraintTop_toBottomOf="@+id/changelog" />
+                    app:layout_constraintTop_toBottomOf="@+id/moreButton" />
 
             <TextView
                     android:id="@+id/textView29"
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/dialogs/AboutVersionDialog.kt b/application/vlc-android/src/org/videolan/vlc/gui/dialogs/AboutVersionDialog.kt
index d8ddc386b2..761ae6e94c 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/dialogs/AboutVersionDialog.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/dialogs/AboutVersionDialog.kt
@@ -70,6 +70,11 @@ class AboutVersionDialog : VLCBottomSheetDialogFragment() {
         binding.libvlcRevision.text = getString(R.string.build_libvlc_revision)
         binding.libvlcVersion.text = BuildConfig.LIBVLC_VERSION
         binding.compiledBy.text = getString(R.string.build_host)
+        binding.moreButton.setOnClickListener {
+            val whatsNewDialog = WhatsNewDialog()
+            whatsNewDialog.show(requireActivity().supportFragmentManager, "fragment_whats_new")
+            dismiss()
+        }
     }
 
 



More information about the Android mailing list