AutoScroll TextView Demo
Posted September 25, 2013
on:Objectives :
– How to use TextView in Android?
– How to scroll Text in Android?
– How to implement Marquee Text in Android?
– How to make text scrollable in Android?
Getting Started :
1. Create a New Android Application titled as “AutoscrollTextviewDemo” with blank activity.
2. Update the layout xml with code given below.
How to do it?
Here is the XML code for Auto Scroll TextView, update your layout xml file with code below.
<LinearLayout xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="AutoScroll TextView" /> <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" /> </LinearLayout>
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.
4 Responses to "AutoScroll TextView Demo"

Aatul Palandurkar,
thanks for making this article! really useful for me to build my application!
Thanks so much. I’m so happy with using this new method.
You can search my apps on Google Play Store just by searching for ProjectPlay.
Kenny Tam (ProejctPlay Entertainment Studio, Hong Kong)
LikeLike

Comments are closed.
June 23, 2014 at 1:56 PM
Recently, I tried to put 2 auto scroll view on the page but it doesn’t work. Why and how can I fix it ?
LikeLike
June 25, 2014 at 10:20 AM
It is same at that of earlier. Please check the code again, ping me again if the problem is not solved.
LikeLike