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 te
Nikki
You need to check the source code here .
again text must comes to its initial position
for this use scrollTo(0, 0);
i want to find the position
use scroll.getCurrX();
want to stop scrolling automatically
use scroll.abortAnimation();
& you are done!:)
EDITED:
Nikki,I wrote a class derived from Android.Widget.TextView
to customize a TextView in which text can be scrolled until text is finished & after finishing text comes back to initial position.All you need to do is create custom class as defined here & just override computeScroll ()
as below
public void computeScroll() {
super.computeScroll();
if (null == mSlr) return;
if (mSlr.isFinished() && (!mPaused)) {
scrollTo(0, 0);//scroll to initial position or whatever position you want it to scroll
}
}