[3.2.0]消息盒子增加车门开关失败operation type=3
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
<?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="160dp"
|
||||
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">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivOperationDoorImage"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginBottom="25dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:src="@drawable/v2x_icon_shigu_sanjiaopai"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvOperationDoorTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/ivOperationDoorImage"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvOperationDoorContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivOperationDoorImage"
|
||||
app:layout_constraintRight_toRightOf="@id/tvOperationDoorTime"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginStart="25dp"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32dp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?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="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivOperationDoorImage"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="110dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginTop="25dp"
|
||||
android:layout_marginBottom="25dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:src="@drawable/v2x_icon_shigu_sanjiaopai"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvOperationDoorTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/ivOperationDoorImage"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvOperationDoorContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivOperationDoorImage"
|
||||
app:layout_constraintRight_toRightOf="@id/tvOperationDoorTime"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginStart="25dp"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32dp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="804dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
@@ -49,4 +49,4 @@
|
||||
android:text="靠边停车"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
Reference in New Issue
Block a user