阅读背景:

跑马灯(横向滚动)_xieyu1999的博客

来源:互联网 
<TextView
        android:id="@+id/tv_text"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:ellipsize="marquee"
        android:focusable="true"
        android:focusableInTouchMode="true"
        android:marqueeRepeatLimit="marquee_forever"
        android:singleLine="true"
        android:textSize="28sp"
        android:text="路漫漫其修远兮,吾将上下而求索3w3erweqrwqreqwreqwerwqrwrq"
        android:textColor="#00ff00"
        android:scrollHorizontally="true"/>




          //设置为跑马灯显示
          android:ellipsize="marquee"

          //获取焦点
          android:focusable="true"

          //可以通过toucth来获得focus
          android:focusableInTouchMode="true"

          //设置重复的次数
          android:marqueeRepeatLimit="marquee_forever"

          //单行显示文字
          android:singleLine="true"<TextView
        android:id="@+id/tv_text"
   



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: