Android-TextView
来源:互联网 发布:ovs linux网桥 编辑:程序博客网 时间:2024/05/22 04:42
一。实现一行长字幕滚动效果
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:ellipsize="marquee" android:focusable="true" android:focusableInTouchMode="true" android:text="@string/hello_world" /></RelativeLayout>
二。实现一行长字幕滚动效果
先新建marqueetext类
public class MarqueeText extends TextView { public MarqueeText(Context context) { super(context); } public MarqueeText(Context context, AttributeSet attrs, int defStyle){ super(context,attrs,defStyle); } public MarqueeText(Context context, AttributeSet attrs){ super(context,attrs); } public boolean isFocused(){ return true; }}activity_main改成
<com.example.fang.text3.MarqueeText android:id="@+id/textview1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:ellipsize="marquee" android:focusable="true" android:focusableInTouchMode="true" android:text="@string/hello_world" /> <com.example.fang.text3.MarqueeText android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="20dp" android:singleLine="true" android:ellipsize="marquee" android:focusable="true" android:focusableInTouchMode="true" android:text="@string/hello_world" /></RelativeLayout>
0 0
- Android TextView
- android textview
- android---TextView
- Android TextView
- Android TextView
- android TextView
- Android TextView
- android TextView
- Android-TextView
- android-textview
- Android TextView
- Android-TextView
- Android TextView
- Android : TextView
- android textview
- Android-TextView
- Android--TextView
- Android:TextView
- 深拷贝
- ElasticSearch 数组搜索的资料
- 生产者与消费者
- python中判断类型
- Swift3-UISearchController的基本使用
- Android-TextView
- 搭建keepalived遇到的问题
- Python 强大的模式匹配
- Jquery中find与each方法用法实例
- Android一些工具方法
- Oracle 调整SGA、PGA大小
- Hack Team
- 占位
- 399. Evaluate Division