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 1b4d088c33..675e865d9d 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
@@ -36,6 +36,7 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
private val operation: Int = 1
private val operationReturn: Int = 10
private val operationStop: Int = 11
+ private val operationDoorSwitchFail: Int = 13 //车门开启、关闭失败
private val notice: Int = 2
private val v2x: Int = 3
private val report: Int = 4
@@ -67,6 +68,11 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
.inflate(R.layout.item_msg_bubble_operation_stop, parent, false)
return BubbleOperationStopHolder(view)
}
+ operationDoorSwitchFail ->{
+ val view = LayoutInflater.from(parent.context)
+ .inflate(R.layout.item_msg_bubble_operation_door, parent, false)
+ return BubbleOperationDoorFailHolder(view)
+ }
report -> {
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_report,parent,false)
return BubbleReportHolder(view)
@@ -117,6 +123,15 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
holder.tvOperationStopContent.text = operationStopMsg.content
}
}
+ //车门开启关闭失败
+ is BubbleOperationDoorFailHolder -> {
+ data?.let{
+ val operationDoorMsg = it[position].msgBoxBean.bean as OperationMsg
+ holder.tvOperationDoorTime.text =
+ TimeUtils.millis2String(operationDoorMsg.timestamp, getHourMinFormat())
+ holder.tvOperationDoorContent.text = operationDoorMsg.content
+ }
+ }
is BubbleReportHolder -> {
data?.let {
val msgBoxBean = it[position].msgBoxBean
@@ -222,7 +237,10 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
}else if((data!![position].msgBoxBean.bean as OperationMsg).type == 1){
//运营平台靠边停车
operationStop
- }else{
+ }else if((data!![position].msgBoxBean.bean as OperationMsg).type == 3){
+ //车门开启关闭失败
+ operationDoorSwitchFail
+ } else{
//普通运营平台
operation
}
@@ -263,7 +281,11 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
var tvOperationStopTime: TextView = itemView.findViewById(R.id.tvOperationStopTime)
var tvOperationStopContent: TextView = itemView.findViewById(R.id.tvOperationStopContent)
}
-
+ //车门开启关闭失败
+ class BubbleOperationDoorFailHolder(itemView: View): RecyclerView.ViewHolder(itemView){
+ var tvOperationDoorTime: TextView = itemView.findViewById(R.id.tvOperationDoorTime)
+ var tvOperationDoorContent: TextView = itemView.findViewById(R.id.tvOperationDoorContent)
+ }
//Notice
class BubbleNoticeHolder(itemView: View): RecyclerView.ViewHolder(itemView){
var ivNoticeImage: ImageView = itemView.findViewById(R.id.ivNoticeImage)
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 bd2466694f..c749c87656 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
@@ -37,6 +37,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
private val operation: Int = 1
private val operationReturn: Int = 10
private val operationStop: Int = 11
+ private val operationDoorSwitchFail: Int = 13
private val notice: Int = 2
private val v2x: Int = 3
private val report: Int = 5
@@ -84,6 +85,11 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
.inflate(R.layout.item_msg_box_operation_stop, parent, false)
return MsgBoxOperationStop(view)
}
+ operationDoorSwitchFail -> {
+ val view = LayoutInflater.from(parent.context)
+ .inflate(R.layout.item_msg_box_operation_door, parent, false)
+ return MsgBoxOperationDoor(view)
+ }
notice -> {
val view = LayoutInflater.from(parent.context)
.inflate(R.layout.item_msg_box_notice, parent, false)
@@ -318,6 +324,15 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
holder.tvOperationStopContent.text = operationStopMsg.content
}
}
+ //运营平台开关门失败
+ is MsgBoxOperationDoor -> {
+ data?.let{
+ val operationDoorMsg = it[position].bean as OperationMsg
+ holder.tvOperationDoorTime.text =
+ TimeUtils.millis2String(operationDoorMsg.timestamp, getHourMinFormat())
+ holder.tvOperationDoorContent.text = operationDoorMsg.content
+ }
+ }
is MsgBoxNotice -> {
data?.let {
val noticeFrCloudMsg = it[position].bean as NoticeFrCloudMsg
@@ -395,7 +410,10 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
}else if((data!![position].bean as OperationMsg).type == 1){
//运营平台靠边停车
operationStop
- }else{
+ }else if((data!![position].bean as OperationMsg).type == 3){
+ //开关门失败
+ operationDoorSwitchFail
+ } else{
//普通运营平台
operation
}
@@ -460,7 +478,11 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
var tvOperationStopTime: TextView = itemView.findViewById(R.id.tvOperationStopTime)
var tvOperationStopContent: TextView = itemView.findViewById(R.id.tvOperationStopContent)
}
-
+ //运营平台开关门失败
+ class MsgBoxOperationDoor(itemView: View) : RecyclerView.ViewHolder(itemView){
+ var tvOperationDoorTime: TextView = itemView.findViewById(R.id.tvOperationDoorTime)
+ var tvOperationDoorContent: TextView = itemView.findViewById(R.id.tvOperationDoorContent)
+ }
//Notice
class MsgBoxNotice(itemView: View) : RecyclerView.ViewHolder(itemView) {
var ivNoticeImage: ImageView = itemView.findViewById(R.id.ivNoticeImage)
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_msg_box_operation_door.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_msg_box_operation_door.xml
new file mode 100644
index 0000000000..e891f34b2e
--- /dev/null
+++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_msg_box_operation_door.xml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_msg_bubble_operation_door.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_msg_bubble_operation_door.xml
new file mode 100644
index 0000000000..1491a8c3b2
--- /dev/null
+++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_msg_bubble_operation_door.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_msg_bubble_operation_stop.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_msg_bubble_operation_stop.xml
index e6b647840f..f1d77aab16 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_msg_bubble_operation_stop.xml
+++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_msg_bubble_operation_stop.xml
@@ -1,5 +1,5 @@
-
-
\ No newline at end of file
+
\ No newline at end of file