TextView的一些常用属性以及对应参数(部分5.0以上)
2015-11-15 00:10
603 查看
<!-- 设置文字颜色、大小,阴影 --> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:textColor="#f00" android:text="测试" android:shadowDx="10.0" android:shadowDy="8.0" android:shadowRadius="3.0" android:shadowColor="#00f" android:textSize="24sp"/>
<!-- 对邮件 电话增加连接 --> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="邮件是:hy412145@163.com电话是:18229099596" android:autoLink="email|phone"/>
autoLink的值:
all 所有
map
none
phone
<!-- 设置中间省略号,所有字母大写 --> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="我爱我家别忘了备上它我喜欢82年的Java,you?" android:ellipsize="middle" android:textAllCaps="true"/>
ellipsize的值:
middle 中间
end 后面
start 前面
marque 滚动
none 没有
<!-- 文本类型 --> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="我爱我家别忘了备上它我喜欢82年的Java,you?" android.inputType="password" android:textAllCaps="true"/>
inputType的值:
password
phone
number
web……
相关文章推荐
- 2015 / 11 / 14 日结 /tableviewcell高度的坑 / label 自适应的坑 / heardview 头部的坑
- telnet命令---Linux学习笔记
- UISlider自定义滑块大小
- 手脱JDPack
- JAVA异常处理
- effective c++尽量少做转型动作(1)
- android开发之wheel控件使用详解
- 2011蓝桥杯java试题及部分参考答案
- android开发之wheel控件使用详解
- android开发之wheel控件使用详解
- 你想Xcode所有知识(所有插件,快捷键,经验技巧)
- JS Canvas动画之太极图
- android开发之wheel控件使用详解
- J2EE面试题
- C++新手1024.cpp试制
- CentOs6.5配置安装DRBD
- iOS Note项目
- MYSQL的COMMIT和ROLLBACK
- mac通过ssh连接阿里云(不需要输入密码哦)
- KindEditor提交用jquery获取不到数据的解决方法