【发布时间】:2012-02-10 20:44:46
【问题描述】:
我使用滚动器进行自动滚动,但即使文本结束,它也会继续滚动。我想找到该位置并希望自动停止滚动,以便在文本滚动文本结束时文本到达其初始位置。我该怎么做?
用于自动滚动的代码是:
public void Scroll()
{
//text = (TextView) findViewById(R.id.TxtView);
length = text.getLineCount();
scroll.computeScrollOffset();
text.setScroller(scroll);
int a = text.getBottom();
int b = text.getTop();
//scroll.extendDuration(scroll.getFinalY());
scroll.startScroll(scroll_x, scroll_y, 0, a, (500000)/ speedAmount);
}
【问题讨论】: