Simple Android Scrolling Text Ticker
Solution 1:
If I'm understand what you're trying to do properly you want to look at the ellipsize
and marqueeRepeatLimit
properties of TextView
.
Via the API:
http://developer.android.com/reference/android/widget/TextView.html#attr_android:ellipsize
http://developer.android.com/reference/android/widget/TextView.html#attr_android:marqueeRepeatLimit
Also, look at this question for an implementation. From what I remember when I had to implement something like this is that the XML properties can be tricky. They interfere with one another and prevent the text from scrolling across the screen so it may take some toying with to get it right.
From there, populating it with different quotes is as simple as calling setText()
on the TextView
with the random quote that I assume you'll have stored in an array or database at the proper time.
Post a Comment for "Simple Android Scrolling Text Ticker"