[2.14.0]消息盒子
This commit is contained in:
@@ -250,6 +250,7 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
notifyData()
|
||||
ipcReportList?.let {
|
||||
linearLayoutManager?.scrollToPositionWithOffset(it.indexOf(msgBoxBean),0)
|
||||
driverMsgBoxListAdapter?.setReportShowData(msgBoxBean)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -31,6 +31,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
||||
|
||||
private var data: List<MsgBoxBean>? = null
|
||||
private var reportBean: MsgBoxBean ?= null
|
||||
|
||||
private val operation: Int = 1
|
||||
private val notice: Int = 2
|
||||
@@ -49,6 +50,10 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
fun setReportShowData(reportClickBean: MsgBoxBean){
|
||||
reportBean = reportClickBean
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||
when (viewType) {
|
||||
record -> {
|
||||
@@ -102,6 +107,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
}
|
||||
is MsgBoxIpcReportHolder -> {
|
||||
data?.let { it ->
|
||||
val reportMsgBox = it[position]
|
||||
holder.tvReportTimeNormal.text =
|
||||
"时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
holder.tvReportTimeOpen.text =
|
||||
@@ -182,6 +188,12 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
holder.tvReportActionOpen.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
reportBean?.let {
|
||||
if(reportMsgBox.timestamp == it.timestamp){
|
||||
holder.tvStatusSelect.performClick()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
is MsgBoxOperation -> {
|
||||
|
||||
Reference in New Issue
Block a user