Nick
Nick

Reputation: 6385

Move screen to certain position

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?

Upvotes: 5

Views: 1433

Answers (1)

Kurtis Nusbaum
Kurtis Nusbaum

Reputation: 30845

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.

Upvotes: 1

Related Questions