[dev_arch_opt_3.0]
[Change] [ 1、解决分支版本冲突 ] Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
@@ -9,7 +9,6 @@ import android.view.View
|
||||
import android.widget.ImageView
|
||||
import android.widget.LinearLayout
|
||||
import chassis.Chassis
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager
|
||||
import com.mogo.och.sweeper.R
|
||||
import kotlinx.android.synthetic.main.sweeper_turn_signal.view.*
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
@@ -24,8 +23,20 @@ class TurnSignalView : LinearLayout {
|
||||
|
||||
private var init: Boolean = false
|
||||
|
||||
constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {}
|
||||
constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes) {}
|
||||
constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) : super(
|
||||
context,
|
||||
attrs,
|
||||
defStyleAttr
|
||||
) {
|
||||
}
|
||||
|
||||
constructor(
|
||||
context: Context?,
|
||||
attrs: AttributeSet?,
|
||||
defStyleAttr: Int,
|
||||
defStyleRes: Int
|
||||
) : super(context, attrs, defStyleAttr, defStyleRes) {
|
||||
}
|
||||
|
||||
private fun initView(context: Context) {
|
||||
LayoutInflater.from(context).inflate(R.layout.sweeper_turn_signal, this)
|
||||
@@ -43,27 +54,25 @@ class TurnSignalView : LinearLayout {
|
||||
//根据左右进行显示和隐藏,实际要判断每个来的时间和频度
|
||||
when (directionLight) {
|
||||
Chassis.LightSwitch.LIGHT_LEFT -> { //左转向
|
||||
CallerVisualAngleManager.changeVisualAngle(CallerVisualAngleManager.Scene.Turning(true))
|
||||
leftSelectImage.visibility = View.VISIBLE
|
||||
rightSelectImage.visibility = View.GONE
|
||||
rightSelectImage.clearAnimation()
|
||||
setAnimation(leftSelectImage)
|
||||
}
|
||||
Chassis.LightSwitch.LIGHT_RIGHT -> { //右转向
|
||||
CallerVisualAngleManager.changeVisualAngle(CallerVisualAngleManager.Scene.Turning(true))
|
||||
leftSelectImage.visibility = View.GONE
|
||||
rightSelectImage.visibility = View.VISIBLE
|
||||
leftSelectImage.clearAnimation()
|
||||
setAnimation(rightSelectImage)
|
||||
}
|
||||
else -> { //消失
|
||||
CallerVisualAngleManager.changeVisualAngle(CallerVisualAngleManager.Scene.Turning(false))
|
||||
leftSelectImage.clearAnimation()
|
||||
rightSelectImage.clearAnimation()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//实现图片闪烁效果
|
||||
private fun setAnimation(imageView: ImageView) {
|
||||
val animationSet = AnimatorSet()
|
||||
|
||||
Reference in New Issue
Block a user