package com.lukouguoji.module_base.ktx

import android.widget.ImageView
import androidx.databinding.BindingAdapter
import com.lukouguoji.module_base.R

@BindingAdapter("setIVCheckImage")
fun setIVCheckImage(imageView: ImageView, isChecked: Boolean) {
    imageView.setImageResource(
        if (isChecked) R.drawable.img_p_check_s else R.drawable.img_p_check_n
    )
}

@BindingAdapter("setIVCheckAllImage")
fun setIVCheckAllImage(imageView: ImageView, isChecked: Boolean) {
    imageView.setImageResource(
        if (isChecked) R.drawable.img_check_all_checked else R.drawable.img_check_all_unchecked
    )
}