Java 如何在android中获得字幕效果
我是android开发新手,我正在尝试让textview在屏幕上水平滚动。\u活动。Java 如何在android中获得字幕效果,java,android,xml,Java,Android,Xml,我是android开发新手,我正在尝试让textview在屏幕上水平滚动。\u活动。 <TextView android:text="Single-line text view that scrolls automatically if the text is too long to fit in the widget" android:singleLine="true" android:ellips
<TextView
android:text="Single-line text view that scrolls automatically if the text is too long to fit in the widget"
android:singleLine="true"
android:ellipsize="marquee"
android:marqueeRepeatLimit ="marquee_forever"
android:focusable="true"
android:focusableInTouchMode="true"
android:scrollHorizontally="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
然后,尝试findviewbyd(R.id.tv).setSelected(true)