首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

TextView 中文字滚动的先决条件

2012-06-26 
TextView 中文字滚动的必要条件在有多个控件中,TextView要让其文字能滚动的的必要条件如下:android:single

TextView 中文字滚动的必要条件
在有多个控件中,TextView要让其文字能滚动的的必要条件如下:

android:singleLine="true"android:ellipsize="marquee"android:focusableInTouchMode="true"android:focusable="true"

以上我试过,缺一不可。
然后再个是
android:marqueeRepeatLimit="3"

可设置控件滚动的次数,如上表示滚动3次。
默认本以为是无限次,试了下,滚动几分钟还是停止了。
那要无限次最好加下属性:
android:marqueeRepeatLimit="marquee_forever"

热点排行