fix #1243, reset video and gif scale on device rotation
This commit is contained in:
parent
40902b8310
commit
99facd2e99
4 changed files with 8 additions and 2 deletions
|
@ -74,7 +74,7 @@ dependencies {
|
|||
implementation 'info.androidhive:imagefilters:1.0.7'
|
||||
implementation 'com.squareup.picasso:picasso:2.71828'
|
||||
implementation 'com.caverock:androidsvg-aar:1.3'
|
||||
implementation 'com.github.tibbi:gestureviews:985ba285fb'
|
||||
implementation 'com.github.tibbi:gestureviews:bd0a8e67a1'
|
||||
implementation 'com.github.tibbi:subsampling-scale-image-view:2fe77ff361'
|
||||
kapt 'com.github.bumptech.glide:compiler:4.8.0' // keep it here too, not just in Commons, else loading SVGs wont work
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue