[Android] Show more info when hitting next/previous/stop keys
Nicolas Pomepuy
git at videolan.org
Mon Oct 7 09:28:52 UTC 2024
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon Sep 30 11:42:34 2024 +0200| [3b7bb9c6d79dac0953fa37bda29b5a250819fe63] | committer: Nicolas Pomepuy
Show more info when hitting next/previous/stop keys
> https://code.videolan.org/videolan/vlc-android/commit/3b7bb9c6d79dac0953fa37bda29b5a250819fe63
---
.../org/videolan/vlc/gui/video/VideoPlayerActivity.kt | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
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 8219d82eba..89746c4fea 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
@@ -1269,10 +1269,6 @@ open class VideoPlayerActivity : AppCompatActivity(), PlaybackService.Callback,
exitOK()
return true
}
- KeyEvent.KEYCODE_P -> {
- takeScreenshot()
- return true
- }
KeyEvent.KEYCODE_DPAD_LEFT -> {
if (isNavMenu)
return navigateDvdMenu(keyCode)
@@ -1422,15 +1418,24 @@ open class VideoPlayerActivity : AppCompatActivity(), PlaybackService.Callback,
}
override fun next() {
- service?.next()
+ if (service?.hasNext() == true) {
+ service?.next()
+ overlayDelegate.showInfo(getString(R.string.next), 1000)
+ }
}
override fun previous() {
- service?.previous(false)
+ service?.let { service ->
+ service.previous(false)
+ overlayDelegate.showInfo(getString(R.string.previous), 1000)
+ }
}
override fun stop() {
- service?.stop()
+ service?.let { service ->
+ service.stop()
+ overlayDelegate.showInfo(getString(R.string.stop), 1000)
+ }
}
override fun seek(delta: Int) {
More information about the Android
mailing list