[Android] Prevent closing equalizer when swiping between vertical progressbars

Nicolas Pomepuy git at videolan.org
Thu Aug 8 13:53:56 CEST 2019


vlc-android | branch: 3.2.x | Nicolas Pomepuy <nicolas.pomepuy at gmail.com> | Mon Aug  5 07:59:19 2019 +0200| [280eaac6d7b50a496738010623fc79d9e31862da] | committer: Geoffrey Métais

Prevent closing equalizer when swiping between vertical progressbars

(cherry picked from commit 2071aa6db11be9bb5a4016698e2dfc43e886829f)

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

 .../src/org/videolan/vlc/gui/audio/EqualizerFragment.kt        | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/EqualizerFragment.kt b/vlc-android/src/org/videolan/vlc/gui/audio/EqualizerFragment.kt
index d44c3d068..88e53cc7b 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/EqualizerFragment.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/EqualizerFragment.kt
@@ -20,6 +20,7 @@
  *****************************************************************************/
 package org.videolan.vlc.gui.audio
 
+import android.annotation.SuppressLint
 import android.content.DialogInterface
 import android.os.Bundle
 import android.text.TextUtils
@@ -120,6 +121,15 @@ class EqualizerFragment : VLCBottomSheetDialogFragment() {
         return binding.root
     }
 
+    @SuppressLint("ClickableViewAccessibility")
+    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
+        super.onViewCreated(view, savedInstanceState)
+        binding.equalizerBands.setOnTouchListener { v, event ->
+            v.parent.requestDisallowInterceptTouchEvent(true)
+            true
+        }
+    }
+
     private fun fillViews() {
         val presets = equalizerPresets
 



More information about the Android mailing list