I am using TextInputLayout to show error message. By default, TextInputLayout's setError() shows error text at the bottom of it. Please refer to No1 Image. Now, accordingly to my designer design, I have to show it at the top of TextInputLayout(pls see No2 Image). I'm now thinking to create custom view here but in the whole project, I have to change many places manually. So, let me know if we can set Gravity for the TextInputLayout error message at the Top. Thanks in advance!
Asked
Active
Viewed 167 times
1
-
This might help you https://stackoverflow.com/questions/42575825/textinputlayout-error-right-align – AskNilesh Jul 07 '22 at 07:35
-
@AskNilesh I have tried it. It only set gravity to start/center or end. Top gravity won't working. It always show under edittext. – ZarNi Myo Sett Win Jul 07 '22 at 07:53
-
May be you can change gravity but more complex to top moving... Debug viewgroup hirarcecy otherwise add your own text view... – Gobu CSG Jul 07 '22 at 10:17
-
@GobuCSG now I'm adding my custom view in every place :3 – ZarNi Myo Sett Win Jul 07 '22 at 10:36
-
1I think that's better. – Gobu CSG Jul 07 '22 at 10:38