reuse the built in fade animations
This commit is contained in:
parent
2f8f3b4362
commit
f76a0cf0ce
|
@ -172,16 +172,19 @@ class VideoFragment : ViewPagerFragment(), View.OnClickListener, SurfaceHolder.C
|
|||
}
|
||||
|
||||
private fun checkFullscreen() {
|
||||
var anim = R.anim.fade_in
|
||||
var anim = android.R.anim.fade_in
|
||||
if (mIsFullscreen) {
|
||||
anim = R.anim.fade_out
|
||||
anim = android.R.anim.fade_out
|
||||
mSeekBar!!.setOnSeekBarChangeListener(null)
|
||||
} else {
|
||||
mSeekBar!!.setOnSeekBarChangeListener(this)
|
||||
}
|
||||
|
||||
val animation = AnimationUtils.loadAnimation(context, anim)
|
||||
mTimeHolder!!.startAnimation(animation)
|
||||
AnimationUtils.loadAnimation(context, anim).apply {
|
||||
duration = 150
|
||||
fillAfter = true
|
||||
mTimeHolder!!.startAnimation(this)
|
||||
}
|
||||
}
|
||||
|
||||
private fun togglePlayPause() {
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="150"
|
||||
android:fillAfter="true"
|
||||
android:fromAlpha="0.0"
|
||||
android:interpolator="@android:anim/accelerate_interpolator"
|
||||
android:toAlpha="1.0"/>
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:duration="150"
|
||||
android:fillAfter="true"
|
||||
android:fromAlpha="1.0"
|
||||
android:interpolator="@android:anim/accelerate_interpolator"
|
||||
android:toAlpha="0.0"/>
|
Loading…
Reference in New Issue