如何使用MaxLines而不是SingleLine选取框?使用maxLines的选框
这是我的TextView:
<TextView
android:text="bla bla bla bla bla bla"
android:id="@+id/MarqueeText"
android:layout_width="30dp"
android:layout_height="wrap_content"
android:singleLine="true"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true">
在我code.java后,我setSelected
我TextView
:
TextView txtView=(TextView) findViewById(R.id.MarqueeText);
txtView.setSelected(true);
问题是android:singleLine
已被弃用,所以我不得不使用android:maxLines
代替,但字幕不要使用它。
我们不能对一个TextView –
设置的inputType为什么不呢?看到这个链接https://developer.android.com/reference/android/widget/TextView.html –