Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android and a TextView's horizontal marquee scroll rate

I have a text view with following XML attributes:

<TextView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="14dip"
    android:maxLines="1"
    android:scrollHorizontally="true"
    android:ellipsize="marquee"
    android:focusable="true"
    android:focusableInTouchMode="true"
    android:marqueeRepeatLimit="1"
    android:textColor="@android:color/black"
    android:id="@+id/ticker"
    />

I'd like to be able to set the horizontal scroll rate, making it slightly faster than the default. How do I do with this (in XML)?

Thanking you in advance.

like image 860
SK9 Avatar asked Feb 16 '11 09:02

SK9


1 Answers

I don't think there's an attribute that you can set in XML for that purpose.

It might be a bit overkill for you, but check out this customized extended marquee for Android, all settings can be customized in the coding part, you need to play with setDuration of the animation to achieve the speed you want.

like image 84
SteD Avatar answered Sep 26 '22 15:09

SteD