Tech tip of this week

How to create a Scrolling Text (marquee) in android using TextView?

Below is the code to display scrolling text

               android:text="Sample Text"
               android:id="@+id/text" />

In Java code, we have to set focus for text view to take scrolling effect.
TextView tv = (TextView) this.findViewById(;
tv.setSelected(true); // Set focus to the textview

No comments:

Post a Comment