【开源】floatlabelededittext
floatlabelededittext
- https://github.com/wrapp/floatlabelededittext
介绍:
让嵌套在floatlabelededittext布局之内的EditText在输入的时候出输入框上方现悬浮文字提示运行效果:
![]()
使用说明:
|
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
|
<com.wrapp.floatlabelededittext.FloatLabeledEditText android:layout_width="match_parent" android:layout_height="wrap_content"> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="This is the hint" /> </com.wrapp.floatlabelededittext.FloatLabeledEditText> <!-- add some padding --> <com.wrapp.floatlabelededittext.FloatLabeledEditText android:layout_width="match_parent" android:layout_height="wrap_content" float:fletPadding="10dp"> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="Username" /> </com.wrapp.floatlabelededittext.FloatLabeledEditText> <!-- password input --> <com.wrapp.floatlabelededittext.FloatLabeledEditText android:layout_width="match_parent" android:layout_height="wrap_content" float:fletPaddingBottom="10dp"> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="Password" android:inputType="textPassword" /> </com.wrapp.floatlabelededittext.FloatLabeledEditText> <!-- change color of hint text--> <com.wrapp.floatlabelededittext.FloatLabeledEditText android:layout_width="match_parent" android:layout_height="wrap_content" float:fletPaddingBottom="10dp" float:fletTextAppearance="@style/floatlabelededittext"> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="Styled Hint" android:inputType="textPassword" /> </com.wrapp.floatlabelededittext.FloatLabeledEditText> |
posted on 2015-04-10 09:45 wasdchenhao 阅读(569) 评论(0) 收藏 举报

浙公网安备 33010602011771号