package com.lukouguoji.module_base.ktx

import android.text.InputFilter
import android.widget.EditText
import androidx.databinding.BindingAdapter


@BindingAdapter("setTextAllCaps")
fun setTextAllCaps(et: EditText, allCaps: Boolean) {
    if (allCaps) {
        et.filters = arrayOf<InputFilter>(InputFilter.AllCaps())
    } else {
        et.filters = emptyArray<InputFilter>()
    }
}