Example
Scrollview.scrollto (0,0);//directly to the top, the instantaneous back to the front, there is no rolling process, where the Y value can be set to greater than 0 value, so that ScrollView stop at the specified location.
Scrollview.fullscroll (VIEW.FOCUS_UP);//similar to manually dragging back to the top, with a scrolling process
Scrollview.smoothscrollto (0, 0);//is similar to manually dragging back to the top, with a scrolling process in which the Y value can be set to a value greater than 0, causing the ScrollView to stop at the specified position.
Example
String type = itemlist.get (position). type;
if (Type.equals (constants.article)) {
Findviewbyid (R.id.article_scrollview). Scrollto (10, 10);
}else{
ScrollView ScrollView = (scrollview) Findviewbyid (R.id.gallery_scrollview);
if (ScrollView!= null)
Scrollview.scrollto (10, 10);
}
The emphasis is on the Scrollto (10, 10) section, which can be implemented ScrollView roll back to the top.