开发者

Running string in Android

I'm not sure, if "running string" the right name.

I try to explain, what I mean.

I have a Tex开发者_运维知识库tView in my Layout and want to have text there, which runs from rigth to left, again, and again, and again.

I thougt, I just should enable marquee for that, but the text stays instead of running :(

Here is my TextView-Code:

<TextView
 android:id="@+id/text_ticker" 
 android:layout_width="fill_parent" 
 android:layout_height="wrap_content" 
 android:background="@color/grey0" 
 android:textColor="@color/black" 
 android:layout_marginLeft="5dp" 
 android:layout_marginRight="5dp" 
 android:layout_marginTop="5dp" 
 android:padding="10dp" 
 android:ellipsize="marquee"      
 android:marqueeRepeatLimit="marquee_forever"
 android:scrollHorizontally="true">
</TextView>

Thank you,

Mur


Ellipsize marquee scrolling will only scroll when the textView gains focus.

Edit: Here is the solution

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜