diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/OTAUpgradeResultDialog.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/OTAUpgradeResultDialog.kt index 0c82996653..1bfeba2764 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/OTAUpgradeResultDialog.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/OTAUpgradeResultDialog.kt @@ -9,7 +9,11 @@ import com.mogo.eagle.core.data.msgbox.OperationMsg import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager import com.mogo.eagle.core.function.hmi.R import com.mogo.eagle.core.function.hmi.dialog.BaseFloatDialog +import com.mogo.eagle.core.utilcode.util.ResourceUtils +import kotlinx.android.synthetic.main.dialog_ota_upgrade_result.ivUpgradeResult +import kotlinx.android.synthetic.main.dialog_ota_upgrade_result.tvResultClose import kotlinx.android.synthetic.main.dialog_ota_upgrade_result.tvResultContent +import kotlinx.android.synthetic.main.dialog_ota_upgrade_result.tvResultTip /** * OTA升级结果提示窗 @@ -24,6 +28,9 @@ class OTAUpgradeResultDialog(context: Context) : init{ setContentView(R.layout.dialog_ota_upgrade_result) setCanceledOnTouchOutside(false) + tvResultClose.setOnClickListener { + dismiss() + } } /** @@ -33,13 +40,17 @@ class OTAUpgradeResultDialog(context: Context) : fun showResult(result: Boolean){ if(result){ //升级成功 + ivUpgradeResult.setImageDrawable(ResourceUtils.getDrawable(R.drawable.icon_ota_upgrade_success)) tvResultContent.text = context.resources.getString(R.string.ota_result_success) + tvResultTip.text = context.resources.getString(R.string.ota_result_success_tip) //消息盒子和语音提示升级成功结果 //TODO 消息盒子提示 AIAssist.getInstance(context).speakTTSVoice("车辆部署任务执行成功,请重启车辆") }else{ //升级失败 + ivUpgradeResult.setImageDrawable(ResourceUtils.getDrawable(R.drawable.icon_ota_upgrade_fail)) tvResultContent.text = context.resources.getString(R.string.ota_result_fail) + tvResultTip.text = context.resources.getString(R.string.ota_result_fail_tip) //消息盒子和语音提示升级失败结果 //TODO 消息盒子提示 AIAssist.getInstance(context).speakTTSVoice("车辆部署任务执行失败") diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_ota_upgrade_fail.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_ota_upgrade_fail.png new file mode 100644 index 0000000000..162e8d55ca Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_ota_upgrade_fail.png differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_ota_upgrade_success.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_ota_upgrade_success.png new file mode 100644 index 0000000000..e4d5d55d73 Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_ota_upgrade_success.png differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_ota_upgrade_tip.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_ota_upgrade_tip.png new file mode 100644 index 0000000000..c24828223d Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_ota_upgrade_tip.png differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_ota_upgrade.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_ota_upgrade.xml index 6ab0bf4171..5fb340946e 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_ota_upgrade.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_ota_upgrade.xml @@ -3,7 +3,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="@dimen/dp_900" - android:layout_height="@dimen/dp_720" + android:layout_height="@dimen/dp_752" android:background="@drawable/bg_bone_dialog" app:roundLayoutRadius="@dimen/dp_50" > @@ -16,25 +16,84 @@ app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" android:text="@string/ota_upgrade_title" - android:textSize="56dp" - android:textColor="#FFFFFFFF" - android:layout_marginTop="50dp" + android:textSize="@dimen/sp_45" + android:textColor="@color/white" + android:layout_marginTop="@dimen/dp_82" + /> + + + + + + + + + + @@ -62,7 +121,7 @@ android:background="@drawable/bg_dialog_btn" app:layout_constraintBottom_toBottomOf="parent" android:layout_marginEnd="@dimen/dp_65" - android:layout_marginBottom="@dimen/dp_62" + android:layout_marginBottom="@dimen/dp_66" app:layout_constraintRight_toRightOf="parent"/> \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_ota_upgrade_result.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_ota_upgrade_result.xml index 25fcc23380..b614246959 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_ota_upgrade_result.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_ota_upgrade_result.xml @@ -3,18 +3,18 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="@dimen/dp_900" - android:layout_height="@dimen/dp_720" + android:layout_height="@dimen/dp_620" android:background="@drawable/bg_bone_dialog" app:roundLayoutRadius="@dimen/dp_50"> @@ -26,8 +26,9 @@ app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toBottomOf="@id/ivUpgradeResult" android:textColor="@color/white" - android:textSize="@dimen/sp_50" - android:layout_marginTop="@dimen/dp_30" + android:textSize="@dimen/sp_45" + android:layout_marginTop="@dimen/dp_20" + android:textStyle="bold" /> diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/values/strings.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/values/strings.xml index d907aec677..acc6795011 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/values/strings.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/values/strings.xml @@ -253,14 +253,17 @@ 车辆部署推送 - 收到推送的车辆任务部署\n请确保⻋辆在安全位置再升级,升级过程中保持⻋辆处于静⽌、上电状态;\n升级过程中请勿进⾏任何操作,包括任务及⾃驾等; + 收到推送的车辆部署任务; + 请确保车辆在安全位置再升级,升级过程中保持车辆处于静止、上电状态; + 升级过程中请勿进行任何操作,包括任务及自驾等; 立即升级 稍后升级 资源下载中 OTA升级结果图片示例 ⻋辆部署任务执⾏成功 ⻋辆部署任务执⾏失败 - 请重启⻋辆 + 请重启⻋辆 + 请联系管理员 关闭