[Android] Prevent closing equalizer when swiping between vertical progressbars

Nicolas Pomepuy git at videolan.org
Wed Aug 7 13:40:21 CEST 2019


vlc-android | branch: master | Nicolas Pomepuy <nicolas.pomepuy at gmail.com> | Mon Aug  5 07:59:19 2019 +0200| [2071aa6db11be9bb5a4016698e2dfc43e886829f] | committer: Nicolas Pomepuy

Prevent closing equalizer when swiping between vertical progressbars

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

 .../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