feat: 国际进港 报文解析
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package com.lukouguoji.gjj.holder
|
||||
|
||||
import android.view.View
|
||||
import com.lukouguoji.gjj.databinding.ItemIntImpMsgParseBinding
|
||||
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||
import com.lukouguoji.module_base.bean.MsgReceivePool
|
||||
|
||||
/**
|
||||
* 国际进港电报解析列表项ViewHolder
|
||||
*/
|
||||
class IntImpMsgParseViewHolder(view: View) :
|
||||
BaseViewHolder<MsgReceivePool, ItemIntImpMsgParseBinding>(view) {
|
||||
|
||||
override fun onBind(item: Any?, position: Int) {
|
||||
val bean = getItemBean(item) ?: return
|
||||
binding.bean = bean
|
||||
binding.position = position
|
||||
binding.executePendingBindings()
|
||||
|
||||
// 添加卡片点击事件 - 查看详情
|
||||
notifyItemClick(position, binding.cardView)
|
||||
|
||||
// 添加选择图标点击事件 - 切换选择状态
|
||||
binding.ivCheck.setOnClickListener {
|
||||
// 反转checked状态
|
||||
bean.checked.set(!bean.checked.get())
|
||||
|
||||
// 立即更新UI
|
||||
binding.executePendingBindings()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user