当前位置: 移动技术网 > IT编程>移动开发>Android > Android实现跑马灯效果的方法

Android实现跑马灯效果的方法

2019年07月24日  | 移动技术网IT编程  | 我要评论

婚烟算命,xmedia掌中影音伴侣,俄罗那英

本文实例讲述了android实现跑马灯效果的方法。分享给大家供大家参考。具体如下:

运行效果截图如下:

直接在布局里写代码就好了:

<textview
   android:id="@+id/menu_desc"
   android:layout_width="300dip"
   android:layout_height="wrap_content"
   android:text="温馨提示:左右滑动更改菜单,点击进入"
   android:textcolor="@color/white"
   android:textsize="22dip"
   android:singleline="true"
   android:ellipsize="marquee"
   android:focusable="true"
   android:focusableintouchmode="true"
   android:scrollhorizontally="true"
   android:marqueerepeatlimit="marquee_forever"
   android:layout_centerhorizontal="true"
   android:layout_centervertical="true"
   >
</textview>

主要是这几行:

android:singleline="true"
android:ellipsize="marquee"
android:focusable="true"
android:focusableintouchmode="true"
android:scrollhorizontally="true"
android:marqueerepeatlimit="marquee_forever"

希望本文所述对大家的android程序设计有所帮助。

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网