我有一个 TextView 并且想要自动水平滚动。我知道可以使用 TextView 的 ellipsize 属性来完成。请帮我解决这个问题。
最佳答案
如下使用textView的ellipsize属性
<TextView
android:id="@+id/mywidget"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:lines="1"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:textColor="#ff4500"
android:text="Simple application that shows how to use marquee, with a long text"/>
关于android - 在 Android 中像 Marquee 一样滚动 TextView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10456133/