一.TextView
属性:
1.android:text 设置文本框的文本内容
2.android:autoLink 是否将符合指定格式的文本转换为可单击的超链接形式
3.android:singleLine 为true文本框不会换行(已过时)
4.android:lines 默认占几行
5.android:minLines 最少占几行
6.android:textColor 字体颜色
7.android:textSize 字体大小
8.android:textStyle 字体风格 如粗体,斜体等
9.android:background 设置背景
2.EditText
属性:
1.android:password 密码框
2.android:phoneNumber 电话号码框
3.android:inputType=“ ”
4.android:textColorHighight 文字被选中时的背景颜色
5.android:hint 提示字符信息
3.Shape外形资源
属性:android:shape (取值:rectangle 矩形 ,oval 椭圆 ,line 直线, ring 圆环)
子节点:
1.<corners>定义几何图形四个角的弧度
2.<gradient> 定义使用渐变颜色填充:属性:
1.android:startColor 开始颜色
2.android:centerColor 中间颜色
3.android:endColor 结束颜色
4.android:angle 方向角度
3.<solid>定义使用单种颜色填充:android:color
4.<stroke>定义几何形状的边框:属性:
1.android:width 边框的宽度
2.android:color 边框的颜色
3.android:dashWidth 虚线的宽度
4.android:dashGap虚线的间距
4.Selector选择器:作用:在控制控件在不同状态下的样式
属性: android:state_focused=“ ” 获取焦点状态的资源,必须放在第一行
android:drawable=“ ” 设置对应的资源或者图片