How can I run a text marquee in the TextView
with delay before start?
At this moment I use the next code to start:
mTVTitle.postDelayed(new Runnable() {
@Override
public void run() {
mTVTitle.setFocusableInTouchMode(true);
mTVTitle.invalidate();
}
}, 1000);
TextView
xml:
<TextView
android:id="@+id/tvTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:focusable="true"
android:marqueeRepeatLimit="2"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAppearance="?attr/titleTextAppearance"
android:textColor="@color/white"/>
But it doesn't work although if I set this property in xml then all right. How to fix it to I can start a marquee programmatically?