attrs.xml
5.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- 仿 ios 开关按钮 -->
<declare-styleable name="SwitchButton">
<!-- 是否选中 -->
<attr name="android:checked" />
<!-- 是否禁用 -->
<attr name="android:enabled" />
</declare-styleable>
<!-- 正则表达式编辑框 -->
<declare-styleable name="RegexEditText">
<!-- 正则输入限制 -->
<attr name="inputRegex" format="string" />
<!-- 常用正则类型 -->
<attr name="regexType" >
<!-- 手机号(只能以 1 开头)-->
<enum name="mobile" value="0x01" />
<!-- 中文(普通的中文字符)-->
<enum name="chinese" value="0x02" />
<!-- 英文(大写和小写的英文)-->
<enum name="english" value="0x03" />
<!-- 数字(只允许输入纯数字)-->
<enum name="number" value="0x04" />
<!-- 整数(非 0 开头的数字)-->
<enum name="count" value="0x05" />
<!-- 用户名(中文、英文、数字)-->
<enum name="name" value="0x06" />
<!-- 非空格字符 -->
<enum name="nonnull" value="0x07" />
</attr>
</declare-styleable>
<!-- 设置栏 -->
<declare-styleable name="SettingBar">
<!-- 左边 -->
<attr name="bar_leftText" format="string"/>
<attr name="bar_leftTextColor" format="color" />
<attr name="bar_leftTextSize" format="dimension" />
<attr name="bar_leftTextHint" format="string"/>
<attr name="bar_leftDrawable" format="reference" />
<attr name="bar_leftDrawablePadding" format="dimension" />
<attr name="bar_leftDrawableSize" format="dimension" />
<attr name="bar_leftDrawableTint" format="color" />
<!-- 右边 -->
<attr name="bar_rightText" format="string" />
<attr name="bar_rightTextColor" format="color" />
<attr name="bar_rightTextSize" format="dimension" />
<attr name="bar_rightTextHint" format="string"/>
<attr name="bar_rightDrawable" format="reference" />
<attr name="bar_rightDrawablePadding" format="dimension" />
<attr name="bar_rightDrawableSize" format="dimension" />
<attr name="bar_rightDrawableTint" format="color" />
<!-- 分割线 -->
<attr name="bar_lineVisible" format="boolean" />
<attr name="bar_lineDrawable" format="reference|color" />
<attr name="bar_lineSize" format="dimension" />
<attr name="bar_lineMargin" format="dimension" />
</declare-styleable>
<!-- 带提交动画按钮 -->
<declare-styleable name="SubmitButton">
<!-- 进度按钮颜色 -->
<attr name="progressColor" format="color" />
<!-- 成功按钮颜色 -->
<attr name="succeedColor" format="color" />
<!-- 出错按钮颜色 -->
<attr name="errorColor" format="color" />
<!-- 进度条样式 -->
<attr name="progressStyle" format="enum">
<!-- 无进度 -->
<enum name="loading" value="0x00" />
<!-- 带进度 -->
<enum name="progress" value="0x01" />
</attr>
</declare-styleable>
<!-- 倾斜的 TextView -->
<declare-styleable name="SlantedTextView">
<attr name="android:text" />
<attr name="android:textSize" />
<attr name="android:textColor" />
<attr name="android:textStyle" />
<attr name="android:gravity" />
<attr name="android:colorBackground" />
<attr name="android:paddingVertical" />
<attr name="android:paddingHorizontal" />
<!-- 显示成三角形 -->
<attr name="triangle" format="boolean" />
</declare-styleable>
<!-- 自定义 ViewStub -->
<declare-styleable name="CustomViewStub">
<!-- 布局 id -->
<attr name="android:layout" />
</declare-styleable>
<!-- 缩放的 ImageView -->
<declare-styleable name="ScaleImageView">
<!-- 缩放比例 -->
<attr name="scaleRatio" format="float" />
</declare-styleable>
<!-- 按照比例显示的 FrameLayout -->
<declare-styleable name="RatioFrameLayout">
<!-- 宽高比例 -->
<attr name="sizeRatio" format="string" />
</declare-styleable>
<!-- 支持限定 Drawable 大小的 TextView -->
<declare-styleable name="DrawableTextView">
<!-- Drawable 宽度 -->
<attr name="drawableWidth" format="dimension" />
<!-- Drawable 高度 -->
<attr name="drawableHeight" format="dimension" />
</declare-styleable>
<!-- 自定义评分控件 -->
<declare-styleable name="SimpleRatingBar">
<!-- 当前星等级 -->
<attr name="grade" format="float"/>
<!-- 星星总数量 -->
<attr name="gradeCount" format="integer"/>
<!-- 星星的宽度 -->
<attr name="gradeWidth" format="dimension" />
<!-- 星星的高度 -->
<attr name="gradeHeight" format="dimension" />
<!-- 星星之间的间隔 -->
<attr name="gradeSpace" format="dimension"/>
<!-- 星星选择跨度 -->
<attr name="gradeStep" format="enum" >
<!-- 半颗星 -->
<enum name="half" value="0x00" />
<!-- 一颗星 -->
<enum name="one" value="0x01" />
</attr>
<!-- 默认的星星图标 -->
<attr name="normalDrawable" format="reference"/>
<!-- 半颗的星星图标 -->
<attr name="halfDrawable" format="reference"/>
<!-- 选中的星星图标 -->
<attr name="fillDrawable" format="reference"/>
</declare-styleable>
<declare-styleable name="PlayButton">
<!-- 线条颜色 -->
<attr name="pb_lineColor" format="color" />
<!-- 线条大小 -->
<attr name="pb_lineSize" format="integer" />
<!-- 动画时间 -->
<attr name="pb_animDuration" format="integer" />
</declare-styleable>
</resources>