安卓跑马灯的效果
2013-11-11 21:04
218 查看
直接在布局里写代码就好了
<TextView
android:id="@+id/menu_desc"
android:layout_width="300dip"
android:layout_height="wrap_content"
android:text="温馨提示:左右可以滑动 。点击可以进入啊"
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"
/>
主要是这几句:
android:singleLine="true"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:scrollHorizontally="true"
android:marqueeRepeatLimit="marquee_forever"
<TextView
android:id="@+id/menu_desc"
android:layout_width="300dip"
android:layout_height="wrap_content"
android:text="温馨提示:左右可以滑动 。点击可以进入啊"
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"
/>
主要是这几句:
android:singleLine="true"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:scrollHorizontally="true"
android:marqueeRepeatLimit="marquee_forever"
相关文章推荐
- daemon进程中文件读写注意的一些问题
- Mean Shift Code for the Edge Detection and Image SegmentatiON system
- 工信部展开第二次抽样调查
- RSS 参考手册
- 黑马程序员——GUI
- cocos2d-x 定义圆形类 进行圆形与方形、圆形与圆形碰撞检测
- ubantu eclipse 经常死机解决方法
- UVA - 11464 Even Parity
- 保留思维中孩子的部分
- 什么是E1、CE1
- UVA 763 - Fibinary Numbers(高精度斐波那契)
- C++ - 函数表(function table) 和 函数(function)容器 的 用法
- 频率f,角频率Ω和数字频率w的物理含义
- IOS 读写plist文件
- C++ - 函数表(function table) 和 函数(function)容器 的 用法
- 12、Hibernate内存查询与数据库查询
- hdu 1540 Tunnel Warfare (线段树维护左右最长连续区间)
- hook
- 用sqlserver 实现带英文字母的流水码
- 练习赛6.2.挖地雷