mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
fix #1243, reset video and gif scale on device rotation
This commit is contained in:
@ -132,6 +132,9 @@ open class VideoPlayerActivity : SimpleActivity(), SeekBar.OnSeekBarChangeListen
|
||||
super.onConfigurationChanged(newConfig)
|
||||
setVideoSize()
|
||||
initTimeHolder()
|
||||
video_surface_frame.onGlobalLayout {
|
||||
video_surface_frame.controller.resetState()
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupOrientation() {
|
||||
|
@ -242,6 +242,7 @@ class PhotoFragment : ViewPagerFragment() {
|
||||
mView.onGlobalLayout {
|
||||
measureScreen()
|
||||
Handler().postDelayed({
|
||||
mView.gif_view_frame.controller.resetState()
|
||||
loadGif()
|
||||
}, 50)
|
||||
}
|
||||
|
@ -246,6 +246,9 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
|
||||
initTimeHolder()
|
||||
checkExtendedDetails()
|
||||
updateInstantSwitchWidths()
|
||||
mView.video_surface_frame.onGlobalLayout {
|
||||
mView.video_surface_frame.controller.resetState()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onSaveInstanceState(outState: Bundle) {
|
||||
@ -253,7 +256,6 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
|
||||
outState.putInt(PROGRESS, mCurrTime)
|
||||
}
|
||||
|
||||
|
||||
private fun storeStateVariables() {
|
||||
mConfig.apply {
|
||||
mStoredShowExtendedDetails = showExtendedDetails
|
||||
|
Reference in New Issue
Block a user