[6.9.0]OTA升级UI调整
This commit is contained in:
@@ -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("车辆部署任务执行失败")
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 281 B |
@@ -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"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_18"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:src="@drawable/icon_ota_upgrade_tip"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_222"
|
||||
android:layout_marginStart="@dimen/dp_65"
|
||||
android:contentDescription="@string/ota_upgrade_tip_one"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_upgrade_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/ota_upgrade_tip_one"
|
||||
android:textSize="@dimen/sp_36"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_upgrade_title"
|
||||
android:text="@string/ota_upgrade_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="43dp"
|
||||
android:gravity="start"
|
||||
android:layout_marginStart="50dp"
|
||||
android:layout_marginEnd="50dp"
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_marginTop="@dimen/dp_206"
|
||||
android:layout_marginStart="@dimen/dp_103"
|
||||
android:layout_marginEnd="@dimen/dp_66"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_18"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:src="@drawable/icon_ota_upgrade_tip"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_272"
|
||||
android:layout_marginStart="@dimen/dp_65"
|
||||
android:contentDescription="@string/ota_upgrade_tip_two"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/ota_upgrade_tip_two"
|
||||
android:textSize="@dimen/sp_36"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_256"
|
||||
android:layout_marginStart="@dimen/dp_103"
|
||||
android:layout_marginEnd="@dimen/dp_66"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_18"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:src="@drawable/icon_ota_upgrade_tip"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_372"
|
||||
android:layout_marginStart="@dimen/dp_65"
|
||||
android:contentDescription="@string/ota_upgrade_tip_three"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/ota_upgrade_tip_three"
|
||||
android:textSize="@dimen/sp_36"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_356"
|
||||
android:layout_marginStart="@dimen/dp_103"
|
||||
android:layout_marginEnd="@dimen/dp_66"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -47,7 +106,7 @@
|
||||
android:textColor="@color/color_2EACFF"
|
||||
android:textSize="@dimen/dp_40"
|
||||
android:layout_marginStart="@dimen/dp_65"
|
||||
android:layout_marginBottom="@dimen/dp_62"
|
||||
android:layout_marginBottom="@dimen/dp_66"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent" />
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -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">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivUpgradeResult"
|
||||
android:layout_width="@dimen/dp_150"
|
||||
android:layout_height="@dimen/dp_150"
|
||||
android:layout_width="@dimen/dp_140"
|
||||
android:layout_height="@dimen/dp_140"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_60"
|
||||
android:layout_marginTop="@dimen/dp_87"
|
||||
android:contentDescription="@string/ota_result_image"
|
||||
/>
|
||||
|
||||
@@ -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"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -38,7 +39,7 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvResultContent"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_40"
|
||||
android:textSize="@dimen/sp_36"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
/>
|
||||
|
||||
|
||||
@@ -253,14 +253,17 @@
|
||||
|
||||
<!--OTA升级-->
|
||||
<string name="ota_upgrade_title">车辆部署推送</string>
|
||||
<string name="ota_upgrade_content">收到推送的车辆任务部署\n请确保⻋辆在安全位置再升级,升级过程中保持⻋辆处于静⽌、上电状态;\n升级过程中请勿进⾏任何操作,包括任务及⾃驾等;</string>
|
||||
<string name="ota_upgrade_tip_one">收到推送的车辆部署任务;</string>
|
||||
<string name="ota_upgrade_tip_two">请确保车辆在安全位置再升级,升级过程中保持车辆处于静止、上电状态;</string>
|
||||
<string name="ota_upgrade_tip_three">升级过程中请勿进行任何操作,包括任务及自驾等;</string>
|
||||
<string name="ota_upgrade_now">立即升级</string>
|
||||
<string name="ota_upgrade_later">稍后升级</string>
|
||||
<string name="ota_download_title">资源下载中</string>
|
||||
<string name="ota_result_image">OTA升级结果图片示例</string>
|
||||
<string name="ota_result_success">⻋辆部署任务执⾏成功</string>
|
||||
<string name="ota_result_fail">⻋辆部署任务执⾏失败</string>
|
||||
<string name="ota_result_tip">请重启⻋辆</string>
|
||||
<string name="ota_result_success_tip">请重启⻋辆</string>
|
||||
<string name="ota_result_fail_tip">请联系管理员</string>
|
||||
<string name="ota_result_close">关闭</string>
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user