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 'info.androidhive:imagefilters:1.0.7'
|
||||||
implementation 'com.squareup.picasso:picasso:2.71828'
|
implementation 'com.squareup.picasso:picasso:2.71828'
|
||||||
implementation 'com.caverock:androidsvg-aar:1.3'
|
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'
|
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
|
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)
|
super.onConfigurationChanged(newConfig)
|
||||||
setVideoSize()
|
setVideoSize()
|
||||||
initTimeHolder()
|
initTimeHolder()
|
||||||
|
video_surface_frame.onGlobalLayout {
|
||||||
|
video_surface_frame.controller.resetState()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupOrientation() {
|
private fun setupOrientation() {
|
||||||
|
|
|
@ -242,6 +242,7 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
mView.onGlobalLayout {
|
mView.onGlobalLayout {
|
||||||
measureScreen()
|
measureScreen()
|
||||||
Handler().postDelayed({
|
Handler().postDelayed({
|
||||||
|
mView.gif_view_frame.controller.resetState()
|
||||||
loadGif()
|
loadGif()
|
||||||
}, 50)
|
}, 50)
|
||||||
}
|
}
|
||||||
|
|
|
@ -246,6 +246,9 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
|
||||||
initTimeHolder()
|
initTimeHolder()
|
||||||
checkExtendedDetails()
|
checkExtendedDetails()
|
||||||
updateInstantSwitchWidths()
|
updateInstantSwitchWidths()
|
||||||
|
mView.video_surface_frame.onGlobalLayout {
|
||||||
|
mView.video_surface_frame.controller.resetState()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onSaveInstanceState(outState: Bundle) {
|
override fun onSaveInstanceState(outState: Bundle) {
|
||||||
|
@ -253,7 +256,6 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
|
||||||
outState.putInt(PROGRESS, mCurrTime)
|
outState.putInt(PROGRESS, mCurrTime)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun storeStateVariables() {
|
private fun storeStateVariables() {
|
||||||
mConfig.apply {
|
mConfig.apply {
|
||||||
mStoredShowExtendedDetails = showExtendedDetails
|
mStoredShowExtendedDetails = showExtendedDetails
|
||||||
|
|
Loading…
Reference in a new issue