Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Move screen to certain position

Tags:

android

When I get a result from an activity in OnActivityResult() I need the ScrollView to be positioned at a certain position. How can I move the view to be positioned to where I need it to be?

like image 735
Nick Avatar asked Nov 14 '22 14:11

Nick


1 Answers

If you know the view in the scroll view that needs to be focused requestChildFocus or requestChildRectangleOnScreen(). If you know the exact x,y coordinates you need to scroll to, use the scrollTo() method.

like image 91
Kurtis Nusbaum Avatar answered Jan 12 '23 15:01

Kurtis Nusbaum