diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxBubbleView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxBubbleView.kt index f5c87af79d..388499ef71 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxBubbleView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxBubbleView.kt @@ -96,6 +96,9 @@ class DriverMsgBoxBubbleView @JvmOverloads constructor( } else if(category == MsgCategory.SYS_INFO){ CallerMsgBoxEventListenerManager.invokeUpdateTipListener(true) //todo 过滤MAP系统异常报警 + } else if(category == MsgCategory.FM_INFO){ + CallerMsgBoxEventListenerManager.invokeUpdateTipListener(true) + showData(msgBoxBean) } else{ if(msgBoxBean.sourceType == DataSourceType.SUMMARY){ //在一次订单中汇总消息只展示一次 diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/adapter/DriverMsgBoxBubbleAdapter.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/adapter/DriverMsgBoxBubbleAdapter.kt index bb9245f5ca..0a3f3c3b84 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/adapter/DriverMsgBoxBubbleAdapter.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/adapter/DriverMsgBoxBubbleAdapter.kt @@ -42,6 +42,7 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A private val v2x: Int = 3 private val report: Int = 4 private val summary: Int = 5 + private val fm: Int = 6 private var changeViewListener: ChangeViewListener?=null @@ -86,6 +87,10 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_summary,parent,false) return BubbleSummaryHolder(view) } + fm -> { + val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_fm,parent,false) + return BubbleFmHolder(view) + } else -> { val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_v2x,parent,false) return BubbleV2XHolder(view) @@ -213,6 +218,12 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A holder.tvSummaryContent.text = summaryMsg.content } } + is BubbleFmHolder ->{ + data?.let { + val fmMsg = it[position].msgBoxBean.bean as FMInfoMsg + + } + } } val msgBoxBean: MsgBoxCountDownBean = data!![position] @@ -260,6 +271,8 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A notice }else if(data!![position].msgBoxBean.type == MsgBoxType.V2X && data!![position].msgBoxBean.sourceType == DataSourceType.SUMMARY){ summary + }else if(data!![position].msgBoxBean.type == MsgBoxType.FMINFO){ + fm } else{ v2x } @@ -320,6 +333,11 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A var tvSummaryTime: TextView = itemView.findViewById(R.id.tvSummaryTime) } + //FM消息 + class BubbleFmHolder(itemView: View): RecyclerView.ViewHolder(itemView){ + + } + fun setChangeListener(listener: ChangeViewListener){ changeViewListener = listener } diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_msg_bubble_fm.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_msg_bubble_fm.xml new file mode 100644 index 0000000000..41d2ef14c5 --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_msg_bubble_fm.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file