do someone have any idea what I did wrong?
# android
a
do someone have any idea what I did wrong?
n
Both ways looks ok, I have a couple of suggestions that you could try: 1. try to write as normal function
Copy code
@BindingAdapter("errorText")
fun setErrorText(view: TextInputLayout, errorText: String?) {
   view.error = errorText
}
2. try to specify setter parameter type:
Copy code
@set:BindingAdapter("errorText")
var TextInputLayout.errorText: String?
   get() = error.toString()
   set(value: String?) {
       error = value
   }
a
I've solve it
in the xml I was trying to set it as app:errorText or android:errorText
but it was enough errorText
n
wait, don’t get, but it should work with
app
as well
a
I've tried both your examples
you can see code that I've copied to the chat
but it didn't worked
n
could you, please, show the layout where you are using it? just curious.
a
full file?
bottom_fragment.xml
on pin_edit_text_layout
but temporarily I've removed it
and the view model is an AndroidViewModel