[6.2.0]消息盒子FM消息
This commit is contained in:
@@ -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){
|
||||
//在一次订单中汇总消息只展示一次
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</LinearLayout>
|
||||
Reference in New Issue
Block a user