android跑马灯文字效果
在layout里面进行配置
- <TextView
- android:layout_width="200dip"
- android:layout_height="wrap_content"
- android:text="1231231242342342342sfsdfsdfsdffqwerwerfwf"
- android:singleLine="true"
- android:ellipsize="marquee"
- android:focusableInTouchMode="true"
- android:marqueeRepeatLimit="1"
- android:focusable="true"
- android:scrollHorizontally="true"
- />
1、指定宽度
2、单行
3、android:ellipsize="marquee":超长滚动
4、android:focusableInTouchMode="true" android:focusable="true"
5、android:marqueeRepeatLimit="1" 滚动次数, marquee_forever无限次数
6、android:scrollHorizontally="true"