From 76c859a0416c849385e8ef4cbc2dd4f4576e813c Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 2 Jan 2019 18:16:53 +0100 Subject: [PATCH] remeasure the video player on device rotation --- .../gallery/pro/activities/VideoPlayerActivity.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/VideoPlayerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/VideoPlayerActivity.kt index c7b1da6e7..9d565482a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/VideoPlayerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/VideoPlayerActivity.kt @@ -99,6 +99,12 @@ open class VideoPlayerActivity : SimpleActivity(), SeekBar.OnSeekBarChangeListen return true } + override fun onConfigurationChanged(newConfig: Configuration) { + super.onConfigurationChanged(newConfig) + setVideoSize() + initTimeHolder() + } + private fun initPlayer() { mUri = intent.data ?: return supportActionBar?.title = getFilenameFromUri(mUri!!) @@ -128,6 +134,11 @@ open class VideoPlayerActivity : SimpleActivity(), SeekBar.OnSeekBarChangeListen handleEvent(event) false } + + video_surface.setOnTouchListener { v, event -> + handleEvent(event) + false + } } initExoPlayer()