public void startMoveTextView()
{
int tmpWidth = getWidth() + 100;
Animation ani = new TranslateAnimation(tmpWidth,tmpWidth * -1,0,0);
ani.setDuration(10000);
ani.setRepeatMode(Animation.RESTART);
ani.setRepeatCount(Animation.INFINITE);
ani.setInterpolator(new LinearInterpolator());
String tmpLongText = "Long text"
textview.setText(tmpLongText);
textview.startAnimation(ani);
}
<TextView
android:id="@+id/tv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:maxLines="1"
android:textColor="@color/news_text_color"
android:text=""
android:textSize="20sp" />
I'm animating long text from right to left
However, in case of long characters, only part of the characters are displayed.
For example, if there are 100 characters, only 20 characters will be displayed.
Is there a way to display the entire text?