今天下午在研究让TextView一行显示数据,多的数据用省略号来表示,实现了,然后又继续研究看怎么样能够使TextView实现跑马灯效果,这样用户可以完整的看到所有的数据。
1.TextView一行显示数据,多的数据用省略号来表示
<TextView android:layout_height="wrap_content"
android:layout_width="200dip"
android:id="@+id/textView1"
android:text="" android:singleLine="true"
android:ellipsize="end"
>
2.TextView实现跑马灯效果
<TextView android:layout_height="wrap_content"
android:layout_width="200dip"
android:id="@+id/textView1"
android:text="" android:singleLine="true"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:focusableInTouchMode="true"
android:focusable="true">
本文详细介绍了如何使用Android的TextView组件,通过设置特定属性,实现一行显示数据并用省略号表示多余信息,以及如何创建跑马灯效果,使用户能够完整查看所有数据。
649

被折叠的 条评论
为什么被折叠?



