This commit is contained in:
lixiaopeng
2022-01-21 18:39:01 +08:00
parent 2a6451f76c
commit 7c48fe0aa6

View File

@@ -69,7 +69,6 @@ class TurnLightViewStatus @JvmOverloads constructor(
} else { //消失
if (!isDisappare) {
animationDisappear()
stopAnimate()
isDisappare = true
isShowNormalBg = false
isLeftLight = false
@@ -97,11 +96,14 @@ class TurnLightViewStatus @JvmOverloads constructor(
private fun animationDisappear() {
left_select_image.visibility = View.GONE
right_select_image.visibility = View.GONE
left_select_image.clearAnimation()
right_select_image.clearAnimation()
val disappearAnimationLeft = AlphaAnimation(1.0f, 0f)
disappearAnimationLeft.duration = 200
disappearAnimationLeft.duration = 300
val disappearAnimationBg = AlphaAnimation(1.0f, 0f)
disappearAnimationBg.duration = 1000
disappearAnimationBg.duration = 1200
left_nor_image.startAnimation(disappearAnimationLeft)
right_nor_image.startAnimation(disappearAnimationLeft)
@@ -129,6 +131,7 @@ class TurnLightViewStatus @JvmOverloads constructor(
override fun onAnimationEnd(p0: Animation?) {
turn_light_layout.visibility = View.GONE
stopAnimate()
}
})
}
@@ -147,8 +150,6 @@ class TurnLightViewStatus @JvmOverloads constructor(
turn_light_layout.clearAnimation()
left_nor_image.clearAnimation()
right_nor_image.clearAnimation()
left_select_image.clearAnimation()
right_select_image.clearAnimation()
}
}