Android:TextView文字跑马灯的效果实现
16lz
2021-01-23
解决TextView文字显示不全的问题。
- 简单设置跑马灯的效果:
<TextView android:id="@+id/textView" android:layout_width="match_parent" android:layout_height="wrap_content" android:ellipsize="marquee" android:focusable="true" android:focusableInTouchMode="true" android:text="@string/hello_world" android:singleLine="true" /> |
2、此方法存在一个问题,多个TextView的话,只有一个显示跑马灯的效果,解决办法是继承TextView类,重写isFocused方法,使之返回真
更多相关文章
- android tween动画效果
- android设置textview限制字数以省略号显示的方法
- Android子控件超出父控件方法
- Android Studio下载及离线升级方法
- Android之实现点击波纹效果
- Delphi XE5 Android 运行黑屏卡死的解决方法
- Android编程: 调试方法