ListView中的个别Item中控件上文字走马灯效果如何实现?或者整条list显示走马灯也行?

解决方案 »

  1.   

    Item是什么样子的,只是文字么?
      

  2.   

    你首先获得对象的引用TextView tv = ....;然后建立一个线程 ....
    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
      

  3.   

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

  4.   


    在布局里加还是在listitem布局里加?在哪些(个)标签下加。
      

  5.   

    都试下吧,因为我也没在List中用过
      

  6.   

    在需要实现跑马灯效果的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"/>
    即可实现
    楼主试试吧
      

  7.   

    看我的博客去吧 我实现了
    http://blog.csdn.net/jzh2012