Android(安卓)TextView跑马灯效果代码
16lz
2021-12-04
实现TextView文字滚动效果(跑马灯)只需要在TextView中多设置一些属性就可以了。具体看代码:
<TextView android:id="@+id/main_more_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:text=" Android TextView跑马灯效果代码 " android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="#FF00FF" android:ellipsize="marquee" android:singleLine="true" android:marqueeRepeatLimit="marquee_forever" android:focusable="true" android:focusableInTouchMode="true" android:scrollHorizontally="true" />最重要的是后面六行代码,还有个地方就是TextView的文字要足够长,不够可以用空格补充!
更多相关文章
- Android(安卓)3D与JNI结合的小例子
- android中的ListView与ScrollView冲突保留ScrollV
- 调试android通过jni调用的C++代码
- Android录音,和实现微信长按录音效果!
- android
- 关于Android(安卓)ListView组件中android:drawSelectorOnTop含义
- gallery 显示文字
- delphi xe5 android 控制蓝牙
- Android(安卓)近百个项目的源代码,覆盖Android开发的每个领域