|
22 | 22 | android:layout_height="match_parent" |
23 | 23 | android:orientation="vertical"> |
24 | 24 |
|
| 25 | + <com.hjq.widget.view.ClearEditText |
| 26 | + style="@style/EditTextStyle" |
| 27 | + android:layout_width="match_parent" |
| 28 | + android:layout_height="wrap_content" |
| 29 | + android:layout_marginHorizontal="@dimen/dp_20" |
| 30 | + android:text="这是一个带清除的按钮的EditText" /> |
| 31 | + |
| 32 | + <com.hjq.widget.view.PasswordEditText |
| 33 | + style="@style/EditTextStyle" |
| 34 | + android:layout_width="match_parent" |
| 35 | + android:layout_height="wrap_content" |
| 36 | + android:layout_marginHorizontal="@dimen/dp_20" |
| 37 | + android:singleLine="true" |
| 38 | + android:text="78797078" /> |
| 39 | + |
| 40 | + <com.hjq.widget.view.RegexEditText |
| 41 | + style="@style/EditTextStyle" |
| 42 | + android:layout_width="match_parent" |
| 43 | + android:layout_height="wrap_content" |
| 44 | + android:layout_marginHorizontal="@dimen/dp_20" |
| 45 | + android:layout_marginTop="@dimen/dp_5" |
| 46 | + android:hint="这里只能输入手机号(只能以 1 开头)" |
| 47 | + app:regexType="mobile" /> |
| 48 | + |
| 49 | + <com.hjq.widget.view.RegexEditText |
| 50 | + style="@style/EditTextStyle" |
| 51 | + android:layout_width="match_parent" |
| 52 | + android:layout_height="wrap_content" |
| 53 | + android:layout_marginHorizontal="@dimen/dp_20" |
| 54 | + android:hint="这里只能输入中文(普通的中文字符)" |
| 55 | + app:regexType="chinese" /> |
| 56 | + |
| 57 | + <com.hjq.widget.view.RegexEditText |
| 58 | + style="@style/EditTextStyle" |
| 59 | + android:layout_width="match_parent" |
| 60 | + android:layout_height="wrap_content" |
| 61 | + android:layout_marginHorizontal="@dimen/dp_20" |
| 62 | + android:hint="这里只能输入英文(大写和小写的英文)" |
| 63 | + app:regexType="english" /> |
| 64 | + |
| 65 | + <com.hjq.widget.view.RegexEditText |
| 66 | + style="@style/EditTextStyle" |
| 67 | + android:layout_width="match_parent" |
| 68 | + android:layout_height="wrap_content" |
| 69 | + android:layout_marginHorizontal="@dimen/dp_20" |
| 70 | + android:hint="这里只能输入数字(只允许输入纯数字)" |
| 71 | + app:regexType="number" /> |
| 72 | + |
| 73 | + <com.hjq.widget.view.RegexEditText |
| 74 | + style="@style/EditTextStyle" |
| 75 | + android:layout_width="match_parent" |
| 76 | + android:layout_height="wrap_content" |
| 77 | + android:layout_marginHorizontal="@dimen/dp_20" |
| 78 | + android:hint="这里只能输入数量(非 0 开头的数字)" |
| 79 | + app:regexType="count" /> |
| 80 | + |
| 81 | + <com.hjq.widget.view.RegexEditText |
| 82 | + style="@style/EditTextStyle" |
| 83 | + android:layout_width="match_parent" |
| 84 | + android:layout_height="wrap_content" |
| 85 | + android:layout_marginHorizontal="@dimen/dp_20" |
| 86 | + android:hint="这里只能输入用户名(中文、英文、数字)" |
| 87 | + app:regexType="name" /> |
| 88 | + |
| 89 | + <com.hjq.widget.view.RegexEditText |
| 90 | + style="@style/EditTextStyle" |
| 91 | + android:layout_width="match_parent" |
| 92 | + android:layout_height="wrap_content" |
| 93 | + android:layout_marginHorizontal="@dimen/dp_20" |
| 94 | + android:hint="这里只能输入非空格的字符" |
| 95 | + app:regexType="nonnull" /> |
| 96 | + |
| 97 | + <androidx.appcompat.widget.AppCompatTextView |
| 98 | + android:layout_width="wrap_content" |
| 99 | + android:layout_height="wrap_content" |
| 100 | + android:layout_gravity="center" |
| 101 | + android:layout_marginTop="@dimen/dp_20" |
| 102 | + android:layout_marginEnd="@dimen/dp_10" |
| 103 | + android:layout_marginBottom="@dimen/dp_10" |
| 104 | + android:text="这是一条华丽的分割线" /> |
| 105 | + |
| 106 | + <View |
| 107 | + style="@style/HorizontalLineStyle" /> |
| 108 | + |
25 | 109 | <LinearLayout |
26 | 110 | android:layout_width="match_parent" |
27 | 111 | android:layout_height="wrap_content" |
| 112 | + android:layout_marginTop="@dimen/dp_20" |
28 | 113 | android:gravity="center" |
29 | 114 | android:orientation="horizontal" |
30 | 115 | android:padding="@dimen/dp_20"> |
|
249 | 334 | android:layout_marginStart="@dimen/dp_20" |
250 | 335 | android:layout_marginTop="@dimen/dp_10" |
251 | 336 | android:layout_marginEnd="@dimen/dp_20" |
| 337 | + android:layout_marginBottom="@dimen/dp_20" |
252 | 338 | android:gravity="center" |
253 | 339 | android:paddingTop="@dimen/dp_30" |
254 | 340 | android:paddingBottom="@dimen/dp_30" |
|
261 | 347 | app:shape_solidColor="@color/white" |
262 | 348 | app:shape_type="rectangle" /> |
263 | 349 |
|
264 | | - <com.hjq.widget.view.ClearEditText |
265 | | - style="@style/EditTextStyle" |
266 | | - android:layout_width="match_parent" |
267 | | - android:layout_height="wrap_content" |
268 | | - android:layout_marginHorizontal="@dimen/dp_40" |
269 | | - android:layout_marginTop="@dimen/dp_10" |
270 | | - android:text="这是一个带清除的按钮的EditText" /> |
271 | | - |
272 | | - <com.hjq.widget.view.PasswordEditText |
273 | | - style="@style/EditTextStyle" |
274 | | - android:layout_width="match_parent" |
275 | | - android:layout_height="wrap_content" |
276 | | - android:layout_marginHorizontal="@dimen/dp_40" |
277 | | - android:layout_marginTop="@dimen/dp_10" |
278 | | - android:singleLine="true" |
279 | | - android:text="78797078" /> |
280 | | - |
281 | | - <com.hjq.widget.view.RegexEditText |
282 | | - style="@style/EditTextStyle" |
283 | | - android:layout_width="match_parent" |
284 | | - android:layout_height="wrap_content" |
285 | | - android:layout_marginHorizontal="@dimen/dp_40" |
286 | | - android:layout_marginTop="@dimen/dp_20" |
287 | | - android:hint="这里只能输入手机号(只能以 1 开头)" |
288 | | - app:regexType="mobile" /> |
289 | | - |
290 | | - <com.hjq.widget.view.RegexEditText |
291 | | - style="@style/EditTextStyle" |
292 | | - android:layout_width="match_parent" |
293 | | - android:layout_height="wrap_content" |
294 | | - android:layout_marginHorizontal="@dimen/dp_40" |
295 | | - android:hint="这里只能输入中文(普通的中文字符)" |
296 | | - app:regexType="chinese" /> |
297 | | - |
298 | | - <com.hjq.widget.view.RegexEditText |
299 | | - style="@style/EditTextStyle" |
300 | | - android:layout_width="match_parent" |
301 | | - android:layout_height="wrap_content" |
302 | | - android:layout_marginHorizontal="@dimen/dp_40" |
303 | | - android:hint="这里只能输入英文(大写和小写的英文)" |
304 | | - app:regexType="english" /> |
305 | | - |
306 | | - <com.hjq.widget.view.RegexEditText |
307 | | - style="@style/EditTextStyle" |
308 | | - android:layout_width="match_parent" |
309 | | - android:layout_height="wrap_content" |
310 | | - android:layout_marginHorizontal="@dimen/dp_40" |
311 | | - android:hint="这里只能输入数字(只允许输入纯数字)" |
312 | | - app:regexType="number" /> |
313 | | - |
314 | | - <com.hjq.widget.view.RegexEditText |
315 | | - style="@style/EditTextStyle" |
316 | | - android:layout_width="match_parent" |
317 | | - android:layout_height="wrap_content" |
318 | | - android:layout_marginHorizontal="@dimen/dp_40" |
319 | | - android:hint="这里只能输入数量(非 0 开头的数字)" |
320 | | - app:regexType="count" /> |
321 | | - |
322 | | - <com.hjq.widget.view.RegexEditText |
323 | | - style="@style/EditTextStyle" |
324 | | - android:layout_width="match_parent" |
325 | | - android:layout_height="wrap_content" |
326 | | - android:layout_marginHorizontal="@dimen/dp_40" |
327 | | - android:hint="这里只能输入用户名(中文、英文、数字)" |
328 | | - app:regexType="name" /> |
329 | | - |
330 | | - <com.hjq.widget.view.RegexEditText |
331 | | - style="@style/EditTextStyle" |
332 | | - android:layout_width="match_parent" |
333 | | - android:layout_height="wrap_content" |
334 | | - android:layout_marginHorizontal="@dimen/dp_40" |
335 | | - android:hint="这里只能输入非空格的字符" |
336 | | - app:regexType="nonnull" /> |
337 | | - |
338 | | - <androidx.appcompat.widget.AppCompatTextView |
339 | | - android:layout_width="wrap_content" |
340 | | - android:layout_height="wrap_content" |
341 | | - android:layout_gravity="center" |
342 | | - android:layout_marginTop="@dimen/dp_20" |
343 | | - android:layout_marginEnd="@dimen/dp_10" |
344 | | - android:layout_marginBottom="@dimen/dp_10" |
345 | | - android:text="这是一条华丽的分割线" /> |
346 | | - |
347 | | - <View |
348 | | - style="@style/HorizontalLineStyle" |
349 | | - android:layout_marginBottom="@dimen/dp_20" /> |
350 | | - |
351 | 350 | </LinearLayout> |
352 | 351 |
|
353 | 352 | </androidx.core.widget.NestedScrollView> |
|
0 commit comments