I want to pass values like EditText's imeOption and inputType to a custom view (which contains an EditText) using @BindingAdapter so it can be customizable from the view that will be using it.
Ideally this would go:
@JvmStatic
@BindingAdapter("customEditText:imeOptions")
fun setImeOption(view: CustomEditText, inputVariable: Int) {
view.binding.editText.imeOptions = inputVariable
}
and in xml:
<CustomEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
customEditText:imeOptions="@{actionDone}"/>
but actionDone cannot be resolved. It there any way to do this?
Note: CustomEditText does not extend EditText, it's just a LinearLayout which contains an EditText among other views