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);
}
重点是scrollTo(10, 10)部分,就可以实现ScrollView滚回顶部。