当加载完整个页面之后对滚动条进行scrollto/scrollby的操作并不能达到效果,
需要等待一段时间后再滚动才行。
举例:
final ScrollView scroll = (ScrollView)ctx.findViewById(R.id.scroll_view);
Thread thread = new Thread(){
@Override
public void run() {
super.run();
try {
this.sleep((long)4000);
scroll.post(new Runnable() {
public void run() {
scroll.scrollBy(0, 500);
}
});
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
};
thread.start();