[6.2.0]消息盒子司机端FM消息
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="804dp"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp"
|
||||
>
|
||||
|
||||
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
Reference in New Issue
Block a user