让TextView滚动起来
来源:互联网 发布:2017淘宝漏洞赚钱方法 编辑:程序博客网 时间:2024/04/30 17:31
让TextView滚动起来
1:首先让一个类去继承TextView,在这个TextView中实现isFocused()方法;
2:在这个方法中设置默认返回值为true;
3:XML布局文件中设置自定义的TextView,eg:
<com.example.textview.MyTextView android:singleLine="true" android:ellipsize="marquee" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="ssssssssssssssssssssssdddddddddddddddddddddddddddddddddsssssssssssssssssssssss " />
在这个TextView中需要声明singleLine属性为true,原因是如果不是一行则起不到显示滚动的效果
还需要设置滚动的属性ellipsize
android:ellipsize=”end”这个属性中其他的值是从哪个方向加上省略号;eg:end,start,middle
0 0
- 让TextView滚动起来
- android TextView跑马灯 让字体滚动起来
- 让文字滚动起来!!!
- android让TextView滚起来
- 让textview可以滚动
- 让你的TextView字体跳动起来
- 让你的Textview 跳跃起来
- 让你的Textview酷炫起来
- ScrollView嵌套TextView,让TextView可以滚动
- 让自定义的view滚动起来
- 让自定义的view滚动起来
- 让按钮上面的文字滚动起来
- cocos2d-x 让小球滚动起来
- 让TextView 自带滚动条
- 让TextView 自带滚动条
- 让 TextView 自带滚动条
- 让 TextView 自带滚动条
- 让TextView 自带滚动条
- 关于C++队列操作(并附上一道Boring题目)
- "compileDebugJavaWithJavac"错误解决
- 一万天以后
- C#_垃圾回收
- 整个社会都缺乏诚信,老实人很难过
- 让TextView滚动起来
- 基于请求响应的MVC框架调用分析
- leetcode -- Longest Palindromic Substring -- 重点,有O(n)思路未理解
- Hive (二) 系统架构
- C语言隐藏控制台窗口
- 算法分析
- Art of Multiprocessor Programming -ch2
- 算法学习:归并排序
- Spring Boot 入门