[v630] refactor: 优化乘客验证页面动画;

This commit is contained in:
aibingbing
2024-03-25 17:28:10 +08:00
parent cb7d52e9c5
commit 7a252d9603
2 changed files with 45 additions and 16 deletions

View File

@@ -16,6 +16,7 @@ import com.mogo.eagle.core.utilcode.kotlin.onClick
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import com.mogo.och.common.module.manager.xiaozhimanager.ZhiViewmanager
import com.mogo.och.common.module.utils.BigFrameAnimatorContainer
import com.mogo.och.common.module.utils.RxUtils
@@ -192,14 +193,27 @@ class ChekAndStartAutopilotView : WindowRelativeLayout,
aniStartAutopilotSuccessAni.setOnAnimStopListener(object :
BigFrameAnimatorContainer.OnAnimationStoppedListener{
override fun AnimationStopped() {
checkPhoneNumber.visibility = View.VISIBLE
startAutopilotView.visibility = View.GONE
startAutopilotClose.visibility = View.GONE
this@ChekAndStartAutopilotView.animate().alpha(0f).withEndAction {
this@ChekAndStartAutopilotView.visibility = View.GONE
aciv_start_autopilt_success_bg.alpha = 0f
aciv_start_autopilt_success_ani.alpha = 0f
}.duration=1000
ThreadUtils.runOnUiThread {
checkPhoneNumber.visibility = View.VISIBLE
startAutopilotView.visibility = View.GONE
startAutopilotClose.visibility = View.GONE
this@ChekAndStartAutopilotView.animate().alpha(0f).setListener(object: AnimatorListenerAdapter() {
override fun onAnimationEnd(animation: Animator) {
super.onAnimationEnd(animation)
this@ChekAndStartAutopilotView.visibility = View.GONE
aciv_start_autopilt_success_bg.alpha = 0f
aciv_start_autopilt_success_ani.alpha = 0f
}
override fun onAnimationCancel(animation: Animator) {
super.onAnimationCancel(animation)
this@ChekAndStartAutopilotView.visibility = View.GONE
aciv_start_autopilt_success_bg.alpha = 0f
aciv_start_autopilt_success_ani.alpha = 0f
}
}).duration=1000L
}
}
})
aniStartAutopilotSuccessAni.start()

View File

@@ -14,6 +14,7 @@ import androidx.lifecycle.findViewTreeViewModelStoreOwner
import com.mogo.eagle.core.utilcode.kotlin.onClick
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import com.mogo.och.common.module.manager.xiaozhimanager.ZhiViewmanager
import com.mogo.och.common.module.utils.BigFrameAnimatorContainer
import com.mogo.och.common.module.utils.RxUtils
@@ -190,14 +191,28 @@ class ChekAndStartAutopilotView : WindowRelativeLayout,
aniStartAutopilotSuccessAni.setOnAnimStopListener(object :
BigFrameAnimatorContainer.OnAnimationStoppedListener{
override fun AnimationStopped() {
checkPhoneNumber.visibility = View.VISIBLE
startAutopilotView.visibility = View.GONE
startAutopilotClose.visibility = View.GONE
this@ChekAndStartAutopilotView.animate().alpha(0f).withEndAction {
this@ChekAndStartAutopilotView.visibility = View.GONE
aciv_start_autopilt_success_bg.alpha = 0f
aciv_start_autopilt_success_ani.alpha = 0f
}.duration=1000
ThreadUtils.runOnUiThread {
checkPhoneNumber.visibility = View.VISIBLE
startAutopilotView.visibility = View.GONE
startAutopilotClose.visibility = View.GONE
this@ChekAndStartAutopilotView.animate().alpha(0f).setListener(object :
AnimatorListenerAdapter() {
override fun onAnimationEnd(animation: Animator) {
super.onAnimationEnd(animation)
this@ChekAndStartAutopilotView.visibility = View.GONE
aciv_start_autopilt_success_bg.alpha = 0f
aciv_start_autopilt_success_ani.alpha = 0f
}
override fun onAnimationCancel(animation: Animator) {
super.onAnimationCancel(animation)
this@ChekAndStartAutopilotView.visibility = View.GONE
aciv_start_autopilt_success_bg.alpha = 0f
aciv_start_autopilt_success_ani.alpha = 0f
}
}).duration = 1000L
}
}
})
aniStartAutopilotSuccessAni.start()