I have used scroller for auto scrolling, but it keeps on scrolling even when text gets over. I want to find the position and want to stop scrolling automatically, so thta text comes to its initial position as during text scrolling text gets over. How can i do this?
The code used for autoscrolling is:
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);
}