[Android] Hide audio chapters buttons when the setting is disabled
Nicolas Pomepuy
git at videolan.org
Fri Feb 28 12:32:39 UTC 2025
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Tue Feb 18 13:57:17 2025 +0100| [422d717d2ebb3dab315824fe50a8bd74b33aa6f4] | committer: Duncan McNamara
Hide audio chapters buttons when the setting is disabled
> https://code.videolan.org/videolan/vlc-android/commit/422d717d2ebb3dab315824fe50a8bd74b33aa6f4
---
.../vlc-android/src/org/videolan/vlc/gui/view/CoverMediaSwitcher.kt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/view/CoverMediaSwitcher.kt b/application/vlc-android/src/org/videolan/vlc/gui/view/CoverMediaSwitcher.kt
index 3c8998f783..5cc025bcda 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/view/CoverMediaSwitcher.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/view/CoverMediaSwitcher.kt
@@ -28,6 +28,7 @@ import android.view.View
import android.widget.ImageView
import android.widget.TextView
import androidx.core.content.ContextCompat
+import org.videolan.tools.KEY_AUDIO_SHOW_CHAPTER_BUTTONS
import org.videolan.tools.Settings
import org.videolan.tools.setGone
import org.videolan.tools.setVisible
@@ -55,7 +56,7 @@ class CoverMediaSwitcher(context: Context, attrs: AttributeSet) : AudioMediaSwit
val previousChapterView = v.findViewById<ImageView?>(R.id.previous_chapter)
val nextChapterView = v.findViewById<ImageView?>(R.id.next_chapter)
- if (hasChapters) {
+ if (hasChapters && Settings.getInstance(context).getBoolean(KEY_AUDIO_SHOW_CHAPTER_BUTTONS, true)) {
previousChapterView?.setVisible()
nextChapterView?.setVisible()
} else {
More information about the Android
mailing list