增加道路属性面板
This commit is contained in:
squallzhjch
2023-05-23 14:03:36 +08:00
parent 6d0f36068d
commit d89ad95a17
6 changed files with 23 additions and 28 deletions

View File

@@ -28,21 +28,7 @@ class LeftAdapter(private var itemListener: ((Int, String) -> Unit?)? = null) :
val bd = holder.viewBinding as TextItemSelectBinding
val title = data[position]
bd.itemId.text = title
if (selectTitle == title) {
bd.itemLayout.setBackgroundColor(
holder.viewBinding.root.context.getColor(
R.color.button_press_color,
)
)
bd.itemId.setTextColor(holder.viewBinding.root.context.getColor(R.color.highFontColor))
} else {
bd.itemLayout.setBackgroundColor(
holder.viewBinding.root.context.getColor(
R.color.white,
)
)
bd.itemId.setTextColor(holder.viewBinding.root.context.getColor(R.color.black))
}
holder.viewBinding.root.isSelected = selectTitle == title
bd.root.setOnClickListener {
if (selectTitle != title) {
selectTitle = title