I have a form with lots of fields and when I press the “submit” button, I’d like the scrollview to jump to the position where the unanswered field is located. Is there a method other than scrollto(x,y) to do this or such coordinates must always be mapped to the form’s elements somehow ( something like (form element).getCoordinates() )?
Thanks
ScrollViews do have predefined methods scrollTo() & scrollBy() for such functionality.
I believe you are having issues in getting co-ordinates. So I suggest store height of each view (that consumes vertical space)by using View.getHeight method & store heights in a Map collection .
Below is the code snippet I tried