1

I have next TextView configuration:

<TextView
    android:id="@+id/test"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"  
    android:focusable="true"  
    android:focusableInTouchMode="true" 
    android:text="TextViewTextVie1wTextViewTextViewTextViewTextView TextViewTextVie1wTextViewTextViewTextViewTextView"
    android:singleLine="true"
    android:ellipsize="marquee"/>

and next line in onCreate() method in MainActivity:

findViewById(R.id.test).setSelected(true);  

So, text in textView is moving.
Have can I make the same behavior without using android:singleLine because it is deprecated.
current API 19

Roman
  • 1,883
  • 2
  • 14
  • 26

0 Answers0