自定义TextView实现跑马灯效果(二)

2014-11-24 11:14:55 · 作者: · 浏览: 3
public void pauseScroll() {
isRun=false;
}
// 点击重新开始
public void restartScroll() {
isRun=true;
scrollToX=0;
startScroll();
}
}
main.xml如下:
[html]
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
android:id="@+id/linerLayout"
android:layout_width="match_parent"
android:layout_height="80dip"
android:layout_alignParentTop="true"
android:orientation="horizontal" >
android:layout_width="fill_parent"
android:layout_height="fill_parent" >