From a9a7acc302be695560a4543f28aa7281680e93e5 Mon Sep 17 00:00:00 2001 From: donghongyu Date: Sat, 2 Apr 2022 12:36:13 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=8CChange=E3=80=8D=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E9=9D=A2=E6=9D=BF=E3=80=8C=E8=BD=A6=E9=80=9F?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E3=80=8DUI=E4=B8=8D=E5=86=8D=E4=B8=BB?= =?UTF-8?q?=E7=BA=BF=E7=A8=8B=E6=9B=B4=E6=96=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: donghongyu --- .../core/function/hmi/ui/tools/AutoPilotAndCheckView.kt | 7 +++++-- .../src/main/res/layout/view_auto_pilot_check.xml | 7 +++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotAndCheckView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotAndCheckView.kt index fdaf95f4a8..5faa68193b 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotAndCheckView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotAndCheckView.kt @@ -21,6 +21,7 @@ import com.mogo.eagle.core.function.hmi.ui.utils.KeyBoardUtil import com.mogo.eagle.core.utilcode.kotlin.onClick import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils import com.mogo.eagle.core.utilcode.util.ToastUtils +import com.mogo.eagle.core.utilcode.util.UiThreadHandler import kotlinx.android.synthetic.main.view_auto_pilot_check.view.* import mogo.telematics.pad.MessagePad @@ -200,7 +201,9 @@ class AutoPilotAndCheckView @JvmOverloads constructor( } override fun onAutopilotCarConfig(carConfigResp: MessagePad.CarConfigResp) { - tvAcceleration.text = "加速度 ${carConfigResp.maxAcceleration} m/s²" - etInputSpeed.setText((carConfigResp.speedLimit * 3.6).toInt().toString()) + UiThreadHandler.post { + tvAcceleration.text = "加速度 ${carConfigResp.maxAcceleration} m/s²" + etInputSpeed.setText((carConfigResp.speedLimit * 3.6).toInt().toString()) + } } } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_auto_pilot_check.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_auto_pilot_check.xml index 99ffdd2b3c..4db5534755 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_auto_pilot_check.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_auto_pilot_check.xml @@ -183,14 +183,13 @@ android:id="@+id/tvAcceleration" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_marginStart="123px" + android:layout_marginTop="12px" android:text="加速度 2 m/s²" android:textColor="#A7B6F0" android:textSize="32px" - android:layout_marginTop="12px" - android:layout_marginStart="123px" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/llSpeedPosition" - /> + app:layout_constraintTop_toBottomOf="@id/llSpeedPosition" />