We are working on an App that needs to work on API19. We are supposed to show a text over a VideoView and when the text is longer (than that can be fit inside the container) we would like to scroll/marquee the text horizontally.
Though the TextView has a property to specify Marquee, we could not get it working.
Here is the XML definition:
android:visibility="invisible"
android:singleLine="true"
android:ellipsize="marquee"
android:marqueeRepeatLimit ="marquee_forever"
android:scrollHorizontally="true"
Here is how it is made visible programmatically:
textView.setVisibility(View.VISIBLE);
textView.setSelected(true);
textView.setEnabled(true);
I even tried to set all attributes programmatically instead of XML definitions. None of the attempts worked. There are many questions on this topic, I tried almost all the suggestions, yet this could not be made to work.
Update:
It works fine if I don't call textView.setText()
. From this answer: https://stackoverflow.com/a/13765865/560449 it appears we can not get Marquee effect to continue working after a call to textView.setText()
. Anyone know of a fix for this?