diff --git a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/StartAutopilotAnimationView.kt b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/StartAutopilotAnimationView.kt
index 17e99eac1a..535e7486de 100644
--- a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/StartAutopilotAnimationView.kt
+++ b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/wigets/StartAutopilotAnimationView.kt
@@ -12,6 +12,7 @@ import android.view.animation.LinearInterpolator
import android.widget.RelativeLayout
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
+import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.och.common.module.R
import com.mogo.och.common.module.utils.SoundPoolHelper
import kotlinx.android.synthetic.main.start_autopilot_animation_view.view.startAutopilotTip
@@ -28,7 +29,7 @@ class StartAutopilotAnimationView @JvmOverloads constructor(
companion object {
private const val ALL_CLOSE_TIMER = 5000L
- private const val TAG = "V2XWarningView"
+ private const val TAG = "StartAutopilotAnimationView"
}
private var startTimer: CountDownTimer? = null
@@ -77,7 +78,6 @@ class StartAutopilotAnimationView @JvmOverloads constructor(
* @see WarningDirectionEnum
*/
private fun showWarning(direction: DirectionEnum, time: Long = ALL_CLOSE_TIMER) {
-
//开始倒计时
countDownTimer()
@@ -146,18 +146,24 @@ class StartAutopilotAnimationView @JvmOverloads constructor(
private fun countDownTimer() {
+ startAutopilotTip.visibility = VISIBLE
+
startTimer = object : CountDownTimer(ALL_CLOSE_TIMER, 1000L) {// 5倒计时后开启自驾
@SuppressLint("SetTextI18n")
override fun onTick(millisUntilFinished: Long) {
// 倒计时
- startAutopilotTip.text = "${(millisUntilFinished/1000).toInt()} 车辆即将自动开启自动驾驶"
+ UiThreadHandler.post {
+ startAutopilotTip.text = "${(millisUntilFinished/1000).toInt()} 车辆即将自动开启自动驾驶"
+ }
playDI()
}
override fun onFinish() {
//倒计时结束了...
- startAutopilotTip.text = "车辆正在自动开启自动驾驶"
+ UiThreadHandler.post {
+ startAutopilotTip.text = "车辆正在自动开启自动驾驶"
+ }
}
}
diff --git a/OCH/mogo-och-common-module/src/main/res/layout/start_autopilot_animation_view.xml b/OCH/mogo-och-common-module/src/main/res/layout/start_autopilot_animation_view.xml
index bf45939451..db831f47da 100644
--- a/OCH/mogo-och-common-module/src/main/res/layout/start_autopilot_animation_view.xml
+++ b/OCH/mogo-och-common-module/src/main/res/layout/start_autopilot_animation_view.xml
@@ -3,6 +3,15 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
+
+
+
-
\ No newline at end of file