您的位置:首页 > 其它

TextView跑马灯效果简单实现

2018-03-01 14:24 417 查看
简易xml实现

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="100dip"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="走马灯效果的演示由于输入的内容多于一行,如果不处理就会直接不显示后面的内容,通过处理可以在前面、中间或后面加一个省略号的效果"
android:singleLine="true"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true" />
</LinearLayout>


跑马灯进阶版:http://blog.csdn.net/u013836857/article/details/51423393

此博客用于个人笔记查阅,同时也和大家一起分享,如有不对,恳请指正。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: