Tima
Tima

Reputation: 12905

Running string in Android

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

I try to explain, what I mean.

I have a TextView 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

Upvotes: 6

Views: 9172

Answers (1)

blindstuff
blindstuff

Reputation: 18348

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

Edit: Here is the solution

Upvotes: 2

Related Questions