From bef7c4ab39b353eab34180660678c2faa6daabdc Mon Sep 17 00:00:00 2001 From: xuxinchao Date: Thu, 9 Nov 2023 11:50:06 +0800 Subject: [PATCH] =?UTF-8?q?[6.2.0]=E6=B6=88=E6=81=AF=E7=9B=92=E5=AD=90?= =?UTF-8?q?=E5=8F=B8=E6=9C=BA=E7=AB=AFFM=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../msgbox/adapter/DriverMsgBoxListAdapter.kt | 31 +++++++++++++++++-- .../src/main/res/layout/item_msg_box_fm.xml | 17 ++++++++++ 2 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_msg_box_fm.xml diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/adapter/DriverMsgBoxListAdapter.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/adapter/DriverMsgBoxListAdapter.kt index d015352286..3154d33766 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/adapter/DriverMsgBoxListAdapter.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/adapter/DriverMsgBoxListAdapter.kt @@ -41,8 +41,9 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : private val operationDoorSwitchFail: Int = 13 private val notice: Int = 2 private val v2x: Int = 3 - private val report: Int = 5 - private val record: Int = 6 + private val fm: Int = 4 //FM信息 + private val report: Int = 5 //系统信息 + private val record: Int = 6 //录包 private val summary: Int = 8 //Error @@ -61,16 +62,24 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder { when (viewType) { + //录包 record -> { val view = LayoutInflater.from(parent.context) .inflate(R.layout.item_bad_case, parent, false) return BadCaseHolder(view) } + //系统信息 report -> { val view = LayoutInflater.from(parent.context) .inflate(R.layout.item_msg_box_ipc_report, parent, false) return MsgBoxIpcReportHolder(view) } + //FM信息 + fm -> { + val view = LayoutInflater.from(parent.context) + .inflate(R.layout.item_msg_box_fm,parent,false) + return FmInfoHolder(view) + } operation -> { val view = LayoutInflater.from(parent.context) .inflate(R.layout.item_msg_box_operation, parent, false) @@ -112,6 +121,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : @SuppressLint("SetTextI18n") override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) { when (holder) { + //录包 is BadCaseHolder -> { data?.let { holder.tvBagReceiveTime.text = @@ -125,6 +135,13 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : } } } + //FM信息 + is FmInfoHolder -> { + data?.let { + + } + } + //系统信息 is MsgBoxIpcReportHolder -> { data?.let { it -> val reportMsgBox = it[position] @@ -434,7 +451,10 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : report } else if (data!![position].type == MsgBoxType.RECORD) { record - } else { + } else if(data!![position].type == MsgBoxType.FMINFO){ + fm + } + else { v2x } } @@ -446,6 +466,11 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : var tvRecordCheck: TextView = itemView.findViewById(R.id.tvRecordCheck) } + //FM信息 + class FmInfoHolder(itemView: View) : RecyclerView.ViewHolder(itemView){ + + } + //车辆系统信息 class MsgBoxIpcReportHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { var ivReportImageNormal: ImageView = itemView.findViewById(R.id.ivReportImageNormal) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_msg_box_fm.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_msg_box_fm.xml new file mode 100644 index 0000000000..f1d2d9d1dd --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_msg_box_fm.xml @@ -0,0 +1,17 @@ + + + + + + \ No newline at end of file