[Android] Remove the confusing video player long tap on the play/pause button

Nicolas Pomepuy git at videolan.org
Thu May 20 08:23:24 UTC 2021


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed May 19 08:23:49 2021 +0200| [0c068db517c0d56ccd23e83570516e03b4108420] | committer: Nicolas Pomepuy

Remove the confusing video player long tap on the play/pause button

Fixes #1632

> https://code.videolan.org/videolan/vlc-android/commit/0c068db517c0d56ccd23e83570516e03b4108420
---

 application/vlc-android/res/layout/player_hud.xml             |  1 -
 .../src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt     | 11 -----------
 2 files changed, 12 deletions(-)

diff --git a/application/vlc-android/res/layout/player_hud.xml b/application/vlc-android/res/layout/player_hud.xml
index 40976d525..fb84c558e 100644
--- a/application/vlc-android/res/layout/player_hud.xml
+++ b/application/vlc-android/res/layout/player_hud.xml
@@ -413,7 +413,6 @@
                     android:contentDescription="@string/play"
                     android:focusable="true"
                     android:onClick="@{(v) -> player.doPlayPause()}"
-                    android:onLongClick="@{player::toggleLoop}"
                     android:scaleType="fitCenter"
                     tools:visibility="visible"
                     vlc:layout_constraintBottom_toBottomOf="parent"
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
index 165ae961a..a19cd0051 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
@@ -1552,17 +1552,6 @@ open class VideoPlayerActivity : AppCompatActivity(), PlaybackService.Callback,
         overlayDelegate.updateRendererVisibility()
     }
 
-    fun toggleLoop(v: View) = service?.run {
-        if (repeatType == PlaybackStateCompat.REPEAT_MODE_ONE) {
-            overlayDelegate.showInfo(getString(R.string.repeat), 1000)
-            repeatType = PlaybackStateCompat.REPEAT_MODE_NONE
-        } else {
-            repeatType = PlaybackStateCompat.REPEAT_MODE_ONE
-            overlayDelegate.showInfo(getString(R.string.repeat_single), 1000)
-        }
-        true
-    } ?: false
-
     override fun onStorageAccessGranted() {
         handler.sendEmptyMessage(START_PLAYBACK)
     }



More information about the Android mailing list