If you want to display which keeps scrolling automatically on a single line textview, you can use the following steps.
First of all, in your xml file, set the following properties for your textview
But still you see that your text is showing marquee. Please remember that the text will auto-scroll only when it has focus or it is selected.
So add the following text in your code.
Now you can see that your text view will display auto scrolling text
First of all, in your xml file, set the following properties for your textview
android:singleline = "true"
android:ellipsize="marquee"
But still you see that your text is showing marquee. Please remember that the text will auto-scroll only when it has focus or it is selected.
So add the following text in your code.
yourtextview.setSelected(true);
Now you can see that your text view will display auto scrolling text
Comments
Post a Comment