So I tried setting an error while validating a tex...
# android
s
So I tried setting an error while validating a text field and the error shows up at the end of the view below the icon, like this. How do I make sure that the error is the the form of a text only, and is right below the text input field?
😂 3
😶 12
I set an error value like this,
textBox.error = "Enter your name"
Looking for something like this : https://material.io/components/text-fields/android#using-text-fields
j
Please check the channel description, this channel is for kotlin related questions only
a
Hey @Sivan I also went through a similar issue. This stackoverflow solution (1st one) may help you out : https://stackoverflow.com/questions/30953449/design-android-edittext-to-show-error-message-as-described-by-google
🙌 1
s
Hey @Aditya. Thanks for the link. So basically I was setting an error value for the TextInputEditText and thats the reason why the error message was attached to the drawable. The solution was to set an error value on the TextInputLayout instead.
😀 2
a
Hope that helped !