mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 04:57: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() {
|
||||
if (activity == null)
|
||||
return
|
||||
|
||||
var anim = android.R.anim.fade_in
|
||||
if (mIsFullscreen) {
|
||||
anim = android.R.anim.fade_out
|
||||
|
@ -167,7 +170,7 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
|||
mSeekBar!!.setOnSeekBarChangeListener(this)
|
||||
}
|
||||
|
||||
AnimationUtils.loadAnimation(context, anim).apply {
|
||||
AnimationUtils.loadAnimation(activity, anim).apply {
|
||||
duration = 150
|
||||
fillAfter = true
|
||||
mTimeHolder!!.startAnimation(this)
|
||||
|
|
Loading…
Reference in a new issue