【转】跑马灯效果

原文地址:http://lovezhou.iteye.com/blog/906563

代码: 

Java代码  收藏代码
    1. <?xml version="1.0" encoding="utf-8"?>  
    2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"  
    3.     android:orientation="vertical"  
    4.     android:layout_width="fill_parent"  
    5.     android:layout_height="fill_parent"  
    6.     >  
    7. <!-- singleLine="true":单行显示 scrollHorizontally="true":水平滚动   
    8.      marqueeRepeatLimit="marquee_forever":重复次数 ,可设置整型值  ellipsize="marquee":滚动-->  
    9. <TextView    
    10.     android:layout_width="wrap_content"   
    11.     android:layout_height="wrap_content"   
    12.     android:singleLine="true"  
    13.     android:ellipsize="marquee"  
    14.     android:focusable="true"  
    15.     android:marqueeRepeatLimit="marquee_forever"  
    16.     android:focusableInTouchMode="true"  
    17.     android:scrollHorizontally="true"  
    18.     android:textSize="18dip"  
    19.     android:textColor="@android:color/white"  
    20.     android:text="开放平台成网络淘金下一站 从圈地到吸纳盟友,除腾讯外,百度、盛大、京东商城等互联网行业标杆目前都已推出了各自的开放平台。"  
    21.     />  
    22. </LinearLayout>  
posted on 2012-07-14 13:41  Code大蛇丸  阅读(243)  评论(0)    收藏  举报