This question already has an answer here:
- Marquee text in Android 15 answers
I have tried to use marquee and its not working here is my code, please let me know where im going wrong
<TextView
android:text="lunch 20.00 | Dinner 60.00 | Travel 60.00 | Doctor 5000.00 | lunch 20.00 | Dinner 60.00 | Travel 60.00 | Doctor 5000.00"
android:id="@+id/TextView02"
android:layout_width="200dip"
android:layout_height="wrap_content"
android:marqueeRepeatLimit="marquee_forever"
android:ellipsize="marquee"
android:singleLine="true"
android:focusable="true"
android:inputType="text"
android:maxLines="1">
</TextView>
i am using android SDK 2.0.1
Use the following line in your code:
Just put these parameters in your TextView. It works :)
`
I faced the same problem and this discussion helped me I just replace this line
with this line in xml
and it works the line
txtView.setSelected(true);
was also in my activity.You must add the these attributes which is compulsary to marquee
for more reference click here http://androiddhina.blogspot.in/2015/10/marquee-effect-in-android-textview.html
Most of the answers are identical,
but also notice that in some cases marquee will not work without specifying of width in dips for the container.
For instance if you use weight in parent container
marquee may not work.