[Android] Prevent displaying the ratio panel when a renderer is active
Nicolas Pomepuy
git at videolan.org
Fri Apr 15 08:58:03 UTC 2022
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Fri Apr 15 08:21:35 2022 +0200| [8f14372870c73cfc0074d89cc10206fd41246870] | committer: Nicolas Pomepuy
Prevent displaying the ratio panel when a renderer is active
> https://code.videolan.org/videolan/vlc-android/commit/8f14372870c73cfc0074d89cc10206fd41246870
---
.../videolan/vlc/gui/video/VideoPlayerResizeDelegate.kt | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerResizeDelegate.kt b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerResizeDelegate.kt
index 0f1ec4017..3055aa405 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerResizeDelegate.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerResizeDelegate.kt
@@ -119,14 +119,14 @@ class VideoPlayerResizeDelegate(private val player: VideoPlayerActivity) {
}
resizeMainView.setOnClickListener { hideResizeOverlay() }
- }
- sizeAdapter.selectedSize = MediaPlayer.ScaleType.values().indexOf(player.service?.mediaplayer?.videoScale ?: MediaPlayer.ScaleType.SURFACE_BEST_FIT)
- scrollView.scrollTo(0, 0)
- resizeMainView.visibility = View.VISIBLE
- if (Settings.showTvUi) AppScope.launch {
- delay(100L)
- val position = (sizeList.layoutManager as LinearLayoutManager).findFirstVisibleItemPosition()
- (sizeList.layoutManager as LinearLayoutManager).findViewByPosition(position)?.requestFocus()
+ sizeAdapter.selectedSize = MediaPlayer.ScaleType.values().indexOf(player.service?.mediaplayer?.videoScale ?: MediaPlayer.ScaleType.SURFACE_BEST_FIT)
+ scrollView.scrollTo(0, 0)
+ resizeMainView.visibility = View.VISIBLE
+ if (Settings.showTvUi) AppScope.launch {
+ delay(100L)
+ val position = (sizeList.layoutManager as LinearLayoutManager).findFirstVisibleItemPosition()
+ (sizeList.layoutManager as LinearLayoutManager).findViewByPosition(position)?.requestFocus()
+ }
}
}
@@ -173,6 +173,7 @@ class VideoPlayerResizeDelegate(private val player: VideoPlayerActivity) {
* display the resize overlay and hide everything else
*/
fun displayResize(): Boolean {
+ if (player.service?.hasRenderer() == true) return false
showResizeOverlay()
overlayDelegate.hideOverlay(true)
return true
More information about the Android
mailing list