mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
add an activity null check at toggling fullscreen
This commit is contained in:
parent
3a48b5d41f
commit
f728ca2650
1 changed files with 4 additions and 1 deletions
|
@ -159,6 +159,9 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun checkFullscreen() {
|
private fun checkFullscreen() {
|
||||||
|
if (activity == null)
|
||||||
|
return
|
||||||
|
|
||||||
var anim = android.R.anim.fade_in
|
var anim = android.R.anim.fade_in
|
||||||
if (mIsFullscreen) {
|
if (mIsFullscreen) {
|
||||||
anim = android.R.anim.fade_out
|
anim = android.R.anim.fade_out
|
||||||
|
@ -167,7 +170,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||||
mSeekBar!!.setOnSeekBarChangeListener(this)
|
mSeekBar!!.setOnSeekBarChangeListener(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
AnimationUtils.loadAnimation(context, anim).apply {
|
AnimationUtils.loadAnimation(activity, anim).apply {
|
||||||
duration = 150
|
duration = 150
|
||||||
fillAfter = true
|
fillAfter = true
|
||||||
mTimeHolder!!.startAnimation(this)
|
mTimeHolder!!.startAnimation(this)
|
||||||
|
|
Loading…
Reference in a new issue