Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 375
Tima Avatar asked Nov 06 '22 05:11

Tima


1 Answers

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

Edit: Here is the solution

like image 197
blindstuff Avatar answered Nov 15 '22 08:11

blindstuff