listview(列表)显示走马灯 ListView中的个别Item中控件上文字走马灯效果如何实现?或者整条list显示走马灯也行? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Item是什么样子的,只是文字么? 你首先获得对象的引用TextView tv = ....;然后建立一个线程 ....public void run(){while(true){ Message m = new Message(); m.what = 1; handle.sendMessage(m); Thread.sleep(1000); }}int off = 0;建立一个handleHandler handle = new Handler(){ public void ...message(){ if(m.what ==1){ String t = data.substring(off,10); tv.setText(t); off = (off+1) % data.length(); } }};随便写了些,大体就这样. 线程+ handler android:singleLine="true"android:ellipsize="marquee" 在布局里加还是在listitem布局里加?在哪些(个)标签下加。 都试下吧,因为我也没在List中用过 在需要实现跑马灯效果的View 里加上: android:singleLine="true" android:ellipsize="marquee" android:focusable="true" android:marqueeRepeatLimit="marquee_forever" android:focusableInTouchMode="true" android:scrollHorizontally="true"比如:<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:ellipsize="marquee" android:focusable="true" android:marqueeRepeatLimit="marquee_forever" android:focusableInTouchMode="true" android:scrollHorizontally="true" android:textSize="18dip"/>即可实现楼主试试吧 看我的博客去吧 我实现了http://blog.csdn.net/jzh2012 Linux下带资源的jar工程怎么编译 android webview 自己做音乐播放器,如何获得音乐文件内部的专辑图片? 关于画图的问题 git使用中发生的错误 popupwindow+listview高手 能不能指定其它路径sqlite数据库 android 怎么模拟2.0以上的系统发短信的界面?短信内容从下网上显示,下面是最新的内容。 大家帮我看看我这个思路对不对? Android对老项目重新开发要注意什么? 求一android游戏控制器的demo Andoird中Unknown savevm section type 95错误原因?
public void run(){
while(true){
Message m = new Message();
m.what = 1;
handle.sendMessage(m);
Thread.sleep(1000);
}}int off = 0;
建立一个handle
Handler handle = new Handler(){
public void ...message(){
if(m.what ==1){
String t = data.substring(off,10);
tv.setText(t);
off = (off+1) % data.length();
}
}
};随便写了些,大体就这样. 线程+ handler
android:ellipsize="marquee"
在布局里加还是在listitem布局里加?在哪些(个)标签下加。
android:singleLine="true"
android:ellipsize="marquee"
android:focusable="true"
android:marqueeRepeatLimit="marquee_forever"
android:focusableInTouchMode="true"
android:scrollHorizontally="true"比如:
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:ellipsize="marquee"
android:focusable="true"
android:marqueeRepeatLimit="marquee_forever"
android:focusableInTouchMode="true"
android:scrollHorizontally="true"
android:textSize="18dip"/>
即可实现
楼主试试吧
http://blog.csdn.net/jzh2012