Android TextView跑马灯没有效果?
黄舟
黄舟 2017-04-17 17:27:20
0
5
533

<TextView

    android:id="@+id/tv_ad4"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:singleLine="true"
    android:maxLines="1"
    android:ellipsize="marquee"
    android:text="浙江省杭州市浙江省杭州市浙江省杭州市浙江省杭州市浙江省杭州市浙江省杭州市浙江省杭州市浙江省杭州市浙江省杭州市浙江省杭州市浙江省杭州市浙江省杭州市"
    android:textColor="@color/black"
    android:focusableInTouchMode="true"
    android:focusable="true"
    android:marqueeRepeatLimit="marquee_forever"
    />
黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(5)
刘奇

Go and check out MOOC.com. . .

Ty80

Is there any necessary connection between the existence of these two controls and the absence of the marquee effect? . . .

黄舟

Personal test, no problem. . .

左手右手慢动作

Inherit textview and then override it

@Override
public boolean isFocused() {
return true;
}
小葫芦

If you need to let the textview get the focus, you can try requestFocus()

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template