I have some editText
in my activity so put them into nestedScrollView
and my activity has the adjustResize
attribute.
I put a textView at bottom of each editText to show the exitText input error.
But their visibility
are Gone
.
When the soft-keyboard open I don't have a problem whit the first exitText
, when I click on Next
button of the soft-jetboard nestedScrollView
scrolled to the bottom of next editText
and if user write a wrong input to my editText
the textView
of them will be visible and show the error of input to the user.
BUT PROBLEM IS.
They are below of their editText
.
How I can scroll nestedScrollView
to the bottom of the textView
?
You could just use
TextInputEditText
andTextInputLayout
instead ofEditText
andTextView
.The scrolling behavior will be managed by Android's system and should result correctly.
Also, it will simplify your code:
You can set and remove errors with:
Java
Kotlin