[6.3.0]
[动画、]
This commit is contained in:
@@ -116,7 +116,7 @@ open class MusicCheckView @JvmOverloads constructor(
|
||||
animator = ObjectAnimator.ofFloat(aciv_playing, "rotation", 0f, 360f)
|
||||
aciv_playing.pivotX = (aciv_playing.width / 2).toFloat()
|
||||
aciv_playing.pivotY = (aciv_playing.height / 2).toFloat()
|
||||
animator?.duration = 4000
|
||||
animator?.duration = 2000
|
||||
animator?.repeatCount = -1
|
||||
animator?.repeatMode = ValueAnimator.RESTART
|
||||
animator?.interpolator = LinearInterpolator()
|
||||
|
||||
@@ -126,14 +126,14 @@ class MusicPlayingView : ConstraintLayout, MusicPlayingViewModel.IMusicPlayingVi
|
||||
sb_musuc_progess.progress=0.toInt()
|
||||
}
|
||||
|
||||
// Glide.with(context)
|
||||
// .load(musicData.coverHeadImageUrl)
|
||||
// .apply(RequestOptions().placeholder(R.drawable.charter_p_music_bg_relax_head))
|
||||
// .into(iv_music_cover)
|
||||
// Glide.with(context)
|
||||
// .load(musicData.coverBottomImageUrl)
|
||||
// .apply(RequestOptions().placeholder(R.drawable.charter_p_music_bg_relax_bottom))
|
||||
// .into(iv_music_cover_bg)
|
||||
Glide.with(context)
|
||||
.load(musicData.coverHeadImageUrl)
|
||||
.apply(RequestOptions().placeholder(R.drawable.charter_p_music_bg_relax_head))
|
||||
.into(iv_music_cover)
|
||||
Glide.with(context)
|
||||
.load(musicData.coverBottomImageUrl)
|
||||
.apply(RequestOptions().placeholder(R.drawable.charter_p_music_bg_relax_bottom))
|
||||
.into(iv_music_cover_bg)
|
||||
}
|
||||
|
||||
private fun startAnimal(){
|
||||
@@ -144,7 +144,7 @@ class MusicPlayingView : ConstraintLayout, MusicPlayingViewModel.IMusicPlayingVi
|
||||
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()
|
||||
animator?.duration = 4000
|
||||
animator?.duration = 2000
|
||||
animator?.repeatCount = -1
|
||||
animator?.repeatMode = ValueAnimator.RESTART
|
||||
animator?.interpolator = LinearInterpolator()
|
||||
|
||||
@@ -21,8 +21,8 @@ object ZhiViewmanager {
|
||||
val loveAni = AniData(AniType.loveAni, R.array.xiaozhi_love, false, true,12)
|
||||
|
||||
val warnAni = AniData(AniType.warnAni, R.array.xiaozhi_warn, false, true,12)
|
||||
val normal2warnAni = AniData(AniType.normal2warnAni, R.array.xiaozhi_normal_warn, false, true,12)
|
||||
val warn2normalAni = AniData(AniType.warn2normalAni, R.array.xiaozhi_normal_warn, false, false,12)
|
||||
val normal2warnAni = AniData(AniType.normal2warnAni, R.array.xiaozhi_normal_warn, false, true,24)
|
||||
val warn2normalAni = AniData(AniType.warn2normalAni, R.array.xiaozhi_normal_warn, false, false,24)
|
||||
|
||||
|
||||
enum class AniType{
|
||||
|
||||
@@ -105,23 +105,20 @@ class FrameAnimatorContainer (resId: Int,
|
||||
private val next: Int
|
||||
get() {
|
||||
mIndex++
|
||||
var isPlayOnce = false
|
||||
if (mIndex >= mFrames.size){
|
||||
mIndex = 0
|
||||
if(isOnce){// 一次性动画 播放完毕后直接结束
|
||||
stop()
|
||||
}
|
||||
isPlayOnce = true
|
||||
|
||||
}
|
||||
if(mIndex==mFrames.size-1){
|
||||
mOnAnimationStoppedListener?.playOnce()
|
||||
}
|
||||
val nextInfo= if(sequence){// 倒叙
|
||||
mFrames[mIndex]
|
||||
}else{
|
||||
mFrames[mFrames.size-1-mIndex]
|
||||
}
|
||||
if(isPlayOnce){// 锁定nextInfo 在回调中可能会修改mFrames值
|
||||
mOnAnimationStoppedListener?.playOnce()
|
||||
}
|
||||
return nextInfo
|
||||
}
|
||||
|
||||
|
||||
@@ -85,8 +85,6 @@
|
||||
<item>@drawable/xiaozhi_think_29</item>
|
||||
<item>@drawable/xiaozhi_think_30</item>
|
||||
<item>@drawable/xiaozhi_think_31</item>
|
||||
<!-- <item>@drawable/xiaozhi_think_32</item>-->
|
||||
<item>@drawable/xiaozhi_warn_033</item>
|
||||
<item>@drawable/xiaozhi_think_34</item>
|
||||
<item>@drawable/xiaozhi_think_35</item>
|
||||
<item>@drawable/xiaozhi_think_36</item>
|
||||
|
||||
@@ -126,14 +126,14 @@ class MusicPlayingView : ConstraintLayout, MusicPlayingViewModel.IMusicPlayingVi
|
||||
sb_musuc_progess.progress=0.toInt()
|
||||
}
|
||||
|
||||
// Glide.with(context)
|
||||
// .load(musicData.coverHeadImageUrl)
|
||||
// .apply(RequestOptions().placeholder(R.drawable.taxt_p_music_bg_relax_head))
|
||||
// .into(iv_music_cover)
|
||||
// Glide.with(context)
|
||||
// .load(musicData.coverBottomImageUrl)
|
||||
// .apply(RequestOptions().placeholder(R.drawable.taxt_p_music_bg_relax_bottom))
|
||||
// .into(iv_music_cover_bg)
|
||||
Glide.with(context)
|
||||
.load(musicData.coverHeadImageUrl)
|
||||
.apply(RequestOptions().placeholder(R.drawable.taxt_p_music_bg_relax_head))
|
||||
.into(iv_music_cover)
|
||||
Glide.with(context)
|
||||
.load(musicData.coverBottomImageUrl)
|
||||
.apply(RequestOptions().placeholder(R.drawable.taxt_p_music_bg_relax_bottom))
|
||||
.into(iv_music_cover_bg)
|
||||
}
|
||||
|
||||
private fun startAnimal(){
|
||||
@@ -144,7 +144,7 @@ class MusicPlayingView : ConstraintLayout, MusicPlayingViewModel.IMusicPlayingVi
|
||||
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()
|
||||
animator?.duration = 4000
|
||||
animator?.duration = 2000
|
||||
animator?.repeatCount = -1
|
||||
animator?.repeatMode = ValueAnimator.RESTART
|
||||
animator?.interpolator = LinearInterpolator()
|
||||
|
||||
@@ -98,10 +98,6 @@ class RightBarView : ConstraintLayout {
|
||||
}
|
||||
iv_center_location.onClick {
|
||||
this.rightBarCallback?.setGo2CenterClick()
|
||||
VoiceNotice.showNotice(
|
||||
"想和我对话的时候可以直接戳我,也可以对我说\\'你好小智\\'!",
|
||||
AIAssist.LEVEL2
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +109,7 @@ class RightBarView : ConstraintLayout {
|
||||
animator = ObjectAnimator.ofFloat(ck_music, "rotation", 0f, 360f)
|
||||
ck_music.pivotX = (ck_music.width / 2).toFloat()
|
||||
ck_music.pivotY = (ck_music.height / 2).toFloat()
|
||||
animator?.duration = 4000
|
||||
animator?.duration = 2000
|
||||
animator?.repeatCount = -1
|
||||
animator?.repeatMode = ValueAnimator.RESTART
|
||||
animator?.interpolator = LinearInterpolator()
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"songUrl": "android.resource://com.mogo.launcher.f/raw/piano_music.mp3",
|
||||
"songUrlType": "local",
|
||||
"coverHeadImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1710406555103/taxt_p_music_head_05.png",
|
||||
"coverBottomImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1710406555103/taxt_p_music_head_05.png",
|
||||
"coverBottomImageUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1709718213773/taxt_p_music_bottom_05.png",
|
||||
"tag": [
|
||||
"放松"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user