[6.3.0]
[动画修改]
This commit is contained in:
@@ -31,6 +31,7 @@ import kotlinx.android.synthetic.main.charter_p_music_playing.view.tv_music_name
|
||||
import kotlinx.android.synthetic.main.charter_p_music_playing.view.tv_playing_during
|
||||
import kotlinx.android.synthetic.main.charter_p_music_playing.view.tv_playing_time
|
||||
import kotlinx.android.synthetic.main.charter_p_music_playing.view.tv_tag
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
|
||||
|
||||
class MusicPlayingView : ConstraintLayout, MusicPlayingViewModel.IMusicPlayingViewCallback {
|
||||
@@ -51,6 +52,7 @@ class MusicPlayingView : ConstraintLayout, MusicPlayingViewModel.IMusicPlayingVi
|
||||
private var animator:ObjectAnimator?=null
|
||||
|
||||
private var isSeekBarTouch = false
|
||||
private val centerWidth = AutoSizeUtils.dp2px(context,70.2f)
|
||||
|
||||
private fun initView() {
|
||||
LayoutInflater.from(context).inflate(R.layout.charter_p_music_playing, this, true)
|
||||
@@ -151,8 +153,8 @@ class MusicPlayingView : ConstraintLayout, MusicPlayingViewModel.IMusicPlayingVi
|
||||
animator = null
|
||||
}
|
||||
animator = ObjectAnimator.ofFloat(iv_music_cover, "rotation", 0f, 360f)
|
||||
iv_music_cover.pivotX = (iv_music_cover.width / 2).toFloat()
|
||||
iv_music_cover.pivotY = (iv_music_cover.height / 2).toFloat()
|
||||
iv_music_cover.pivotX = (centerWidth).toFloat()
|
||||
iv_music_cover.pivotY = (centerWidth).toFloat()
|
||||
animator?.duration = 3000
|
||||
animator?.repeatCount = -1
|
||||
animator?.repeatMode = ValueAnimator.RESTART
|
||||
|
||||
@@ -29,6 +29,7 @@ import kotlinx.android.synthetic.main.taxi_p_music_playing.view.tv_music_name
|
||||
import kotlinx.android.synthetic.main.taxi_p_music_playing.view.tv_playing_during
|
||||
import kotlinx.android.synthetic.main.taxi_p_music_playing.view.tv_playing_time
|
||||
import kotlinx.android.synthetic.main.taxi_p_music_playing.view.tv_tag
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
|
||||
|
||||
class MusicPlayingView : ConstraintLayout, MusicPlayingViewModel.IMusicPlayingViewCallback {
|
||||
@@ -49,6 +50,8 @@ class MusicPlayingView : ConstraintLayout, MusicPlayingViewModel.IMusicPlayingVi
|
||||
|
||||
private var isSeekBarTouch = false
|
||||
|
||||
private val centerWidth = AutoSizeUtils.dp2px(context,146f)
|
||||
|
||||
private fun initView() {
|
||||
LayoutInflater.from(context).inflate(R.layout.taxi_p_music_playing, this, true)
|
||||
|
||||
@@ -143,8 +146,8 @@ class MusicPlayingView : ConstraintLayout, MusicPlayingViewModel.IMusicPlayingVi
|
||||
animator = null
|
||||
}
|
||||
animator = ObjectAnimator.ofFloat(iv_music_cover, "rotation", 0f, 360f)
|
||||
iv_music_cover.pivotX = (iv_music_cover.getWidth() / 2).toFloat()
|
||||
iv_music_cover.pivotY = (iv_music_cover.height / 2).toFloat()
|
||||
iv_music_cover.pivotX = (centerWidth).toFloat()
|
||||
iv_music_cover.pivotY = (centerWidth).toFloat()
|
||||
animator?.duration = 3000
|
||||
animator?.repeatCount = -1
|
||||
animator?.repeatMode = ValueAnimator.RESTART
|
||||
|
||||
@@ -86,6 +86,7 @@ class ChekAndStartAutopilotView : WindowRelativeLayout,
|
||||
ZhiViewmanager.showListeningAni(ZhiViewmanager.beltAni)
|
||||
aciv_start_autopilt_success_bg.alpha = 0f
|
||||
aciv_start_autopilt_success_ani.alpha = 0f
|
||||
d(SceneConstant.M_TAXI_P + TAG, "透明度${aciv_start_autopilt_success_bg.alpha}---${aciv_start_autopilt_success_ani.alpha}")
|
||||
} else {
|
||||
aniCheck2StartAutopilotView = null
|
||||
ZhiViewmanager.showListeningAni(ZhiViewmanager.normalAni)
|
||||
@@ -142,6 +143,9 @@ class ChekAndStartAutopilotView : WindowRelativeLayout,
|
||||
}
|
||||
when (status) {
|
||||
0 -> {
|
||||
aciv_start_autopilt_success_bg.alpha = 0f
|
||||
aciv_start_autopilt_success_ani.alpha = 0f
|
||||
d(SceneConstant.M_TAXI_P + TAG, "透明度${aciv_start_autopilt_success_bg.alpha}---${aciv_start_autopilt_success_ani.alpha}")
|
||||
checkPhoneNumber.visibility = View.VISIBLE
|
||||
startAutopilotView.visibility = View.GONE
|
||||
startAutopilotClose.visibility = View.GONE
|
||||
@@ -150,6 +154,9 @@ class ChekAndStartAutopilotView : WindowRelativeLayout,
|
||||
}.start()
|
||||
}
|
||||
1 -> {
|
||||
aciv_start_autopilt_success_bg.alpha = 0f
|
||||
aciv_start_autopilt_success_ani.alpha = 0f
|
||||
d(SceneConstant.M_TAXI_P + TAG, "透明度${aciv_start_autopilt_success_bg.alpha}---${aciv_start_autopilt_success_ani.alpha}")
|
||||
checkPhoneNumber.visibility = View.GONE
|
||||
startAutopilotView.visibility = View.VISIBLE
|
||||
startAutopilotClose.visibility = View.VISIBLE
|
||||
@@ -184,6 +191,10 @@ class ChekAndStartAutopilotView : WindowRelativeLayout,
|
||||
animatorSetCompat.duration=700
|
||||
animatorSetCompat.interpolator = LinearInterpolator()
|
||||
animatorSetCompat.addListener(object :AnimatorListenerAdapter(){
|
||||
override fun onAnimationEnd(animation: Animator) {
|
||||
super.onAnimationEnd(animation)
|
||||
d(SceneConstant.M_TAXI_P + TAG, "透明度${aciv_start_autopilt_success_bg.alpha}---${aciv_start_autopilt_success_ani.alpha}")
|
||||
}
|
||||
override fun onAnimationStart(animation: Animator) {
|
||||
RxUtils.createSubscribe(350) {
|
||||
val aniStartAutopilotSuccessAni =
|
||||
@@ -203,6 +214,7 @@ class ChekAndStartAutopilotView : WindowRelativeLayout,
|
||||
this@ChekAndStartAutopilotView.visibility = View.GONE
|
||||
aciv_start_autopilt_success_bg.alpha = 0f
|
||||
aciv_start_autopilt_success_ani.alpha = 0f
|
||||
d(SceneConstant.M_TAXI_P + TAG, "透明度${aciv_start_autopilt_success_bg.alpha}---${aciv_start_autopilt_success_ani.alpha}")
|
||||
}
|
||||
|
||||
override fun onAnimationCancel(animation: Animator) {
|
||||
@@ -210,6 +222,7 @@ class ChekAndStartAutopilotView : WindowRelativeLayout,
|
||||
this@ChekAndStartAutopilotView.visibility = View.GONE
|
||||
aciv_start_autopilt_success_bg.alpha = 0f
|
||||
aciv_start_autopilt_success_ani.alpha = 0f
|
||||
d(SceneConstant.M_TAXI_P + TAG, "透明度${aciv_start_autopilt_success_bg.alpha}---${aciv_start_autopilt_success_ani.alpha}")
|
||||
}
|
||||
}).duration = 1000L
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user