[singapore]
[vin 展示两端的vin码]
This commit is contained in:
yangyakun
2026-04-01 20:04:33 +08:00
parent 1a3d0e10fa
commit dc0cc9c738
3 changed files with 24 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog
import com.mogo.eagle.core.utilcode.kotlin.onClick
import com.mogo.och.bridge.R
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
import kotlinx.android.synthetic.main.common_checkvin_view.actv_error_body_vin
import kotlinx.android.synthetic.main.common_checkvin_view.actv_see
class CheckVinErrorDialog(context: Context) : BaseFloatDialog(context), LifecycleObserver {
@@ -26,6 +27,11 @@ class CheckVinErrorDialog(context: Context) : BaseFloatDialog(context), Lifecycl
}
}
fun setVinInfo(serverVin: String, delineVin: String) {
actv_error_body_vin.text = "${serverVin}-->${delineVin}"
}
fun showDialog() {
if (isShowing) {
return
@@ -39,5 +45,4 @@ class CheckVinErrorDialog(context: Context) : BaseFloatDialog(context), Lifecycl
}
}
}

View File

@@ -56,9 +56,11 @@ object CheckVinManager : IMoGoAutopilotCarConfigListener {
topActivity?.let {
UiThreadHandler.post({
if (checkVinErrorDialog != null && checkVinErrorDialog!!.isShowing) {
checkVinErrorDialog?.setVinInfo(serverVin,delineVin)
return@post
}
checkVinErrorDialog = CheckVinErrorDialog(it)
checkVinErrorDialog?.setVinInfo(serverVin,delineVin)
checkVinErrorDialog?.showDialog()
}, UiThreadHandler.MODE.QUEUE)
}

View File

@@ -53,19 +53,33 @@
app:layout_constraintTop_toBottomOf="@+id/actv_error_body"
android:text="@string/common_check_vin_tip" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/actv_error_body_vin"
android:layout_width="match_parent"
android:layout_marginStart="@dimen/dp_60"
android:layout_marginEnd="@dimen/dp_60"
android:layout_height="wrap_content"
android:gravity="center"
android:textColor="@android:color/holo_red_dark"
android:textSize="@dimen/dp_40"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/actv_error_body_red"
android:text="@string/common_check_vin_tip" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/actv_see"
android:layout_width="@dimen/dp_350"
android:layout_height="@dimen/dp_130"
android:layout_marginTop="40dp"
android:layout_marginBottom="@dimen/dp_80"
android:layout_marginBottom="@dimen/dp_60"
android:background="@drawable/common_error_vin_submit"
android:gravity="center"
android:text="@string/common_check_vin_ensure"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_46"
app:layout_constraintTop_toBottomOf="@+id/actv_error_body_red"
app:layout_constraintTop_toBottomOf="@+id/actv_error_body_vin"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />