mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 13:08:00 +01:00
remeasure the video player on device rotation
This commit is contained in:
parent
67c3339d7d
commit
76c859a041
1 changed files with 11 additions and 0 deletions
|
@ -99,6 +99,12 @@ open class VideoPlayerActivity : SimpleActivity(), SeekBar.OnSeekBarChangeListen
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onConfigurationChanged(newConfig: Configuration) {
|
||||||
|
super.onConfigurationChanged(newConfig)
|
||||||
|
setVideoSize()
|
||||||
|
initTimeHolder()
|
||||||
|
}
|
||||||
|
|
||||||
private fun initPlayer() {
|
private fun initPlayer() {
|
||||||
mUri = intent.data ?: return
|
mUri = intent.data ?: return
|
||||||
supportActionBar?.title = getFilenameFromUri(mUri!!)
|
supportActionBar?.title = getFilenameFromUri(mUri!!)
|
||||||
|
@ -128,6 +134,11 @@ open class VideoPlayerActivity : SimpleActivity(), SeekBar.OnSeekBarChangeListen
|
||||||
handleEvent(event)
|
handleEvent(event)
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
video_surface.setOnTouchListener { v, event ->
|
||||||
|
handleEvent(event)
|
||||||
|
false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
initExoPlayer()
|
initExoPlayer()
|
||||||
|
|
Loading…
Reference in a new issue