文字跑马灯常用于文字过长显示不完整时可以用到,
<TextView
android:id="@+id/marquee_text_id"
android:layout_width="wrap_content"
android:layout_height="60dip"
android:ellipsize="marquee" //表示跑马灯
android:focusable="true"
android:focusableInTouchMode="true"
android:singleLine="true"//单行
android:marqueeRepeatLimit="marquee_forever" //不断循环播放
android:scrollHorizontally="true"
/>
正常用的话是没什么问题的,
如果将其放到listview中,就需要设置listview
list.setFocusable(false);
list.setFocusableInTouchMode(false);
否则无法播放