[6.2.9]消息盒子Report关键INFO事件 PAD显示需求

This commit is contained in:
xuxinchao
2024-01-24 16:45:40 +08:00
parent 70814ce094
commit 11f8fb666f
2 changed files with 43 additions and 2 deletions

View File

@@ -52,6 +52,11 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
private val RESULT_AUTOPILOT_SYSTEM_UNSTARTED = "RESULT_AUTOPILOT_SYSTEM_UNSTARTED"
private val RESULT_REMOTEPILOT_DISABLE = "RESULT_REMOTEPILOT_DISABLE"
//Warning
private val RESULT_AUTOPILOT_INFERIOR = "RESULT_AUTOPILOT_INFERIOR"
private val RESULT_SHOW_WARNING = "RESULT_SHOW_WARNING"
private val RESULT_REMOTEPILOT_INFERIOR = "RESULT_REMOTEPILOT_INFERIOR"
fun setData(data: List<MsgBoxBean>) {
this.data = data
notifyDataSetChanged()
@@ -378,13 +383,23 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
holder.ivReportImageOpen.setImageDrawable(getDrawable(R.drawable.icon_report_error_open))
holder.tvReportLevelNormal.text = "Error"
holder.tvReportLevelOpen.text = "Error"
} else {
} else if(reportEntity.resultList.contains(RESULT_AUTOPILOT_INFERIOR)
|| reportEntity.resultList.contains(RESULT_SHOW_WARNING)
|| reportEntity.resultList.contains(RESULT_REMOTEPILOT_INFERIOR)
){
//Warning
holder.ivReportImageNormal.setImageDrawable(getDrawable(R.drawable.icon_report_warning_normal))
holder.ivReportImageOpen.setImageDrawable(getDrawable(R.drawable.icon_report_warning_open))
holder.tvReportLevelNormal.text = "Warning"
holder.tvReportLevelOpen.text = "Warning"
}else {
//INFO
holder.ivReportImageNormal.setImageDrawable(getDrawable(R.drawable.icon_report_warning_normal))
holder.ivReportImageOpen.setImageDrawable(getDrawable(R.drawable.icon_report_warning_open))
holder.tvReportLevelNormal.text = "Info"
holder.tvReportLevelOpen.text = "Info"
}
holder.tvReportTimeNormal.text =
"时间:${TimeUtils.millis2String(it[position].timestamp)}"
holder.tvReportTimeOpen.text =