I want to have a simple TextView with horizontal scrolling, I know that I use HorizontalScrollview for that and I want the text to be autoscrolled continuously. Is that possible?
Asked
Active
Viewed 2,768 times
2 Answers
4
You could use android:ellipsize="marquee" in the TextView attributes or by implement your own animation

Francesco Laurita
- 23,434
- 8
- 55
- 63
-
3A side note: The default marquee animation starts only if the TextView being selected. – Francesco Laurita Jun 03 '10 at 20:05
1
This is small example for auto scroll text view simply using XML, no need to code Java. Hope you will like it! Try it on your own, it is very easy to perform
Try this :
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:scrollHorizontally="true"
android:ellipsize="marquee"
android:marqueeRepeatLimit ="marquee_forever"
android:focusable="true"
android:focusableInTouchMode="true"
android:text="This is small example for auto scroll text view simply using XML, no need to code Java. Hope you like it! Try it on your own, it is very easy to perform" />
Here text will scroll automatically and you will get infinite scroll. Have fun!

Aatul Palandurkar
- 21
- 2