@@ -26,51 +26,62 @@ XML widget to create the Material Design Floating Action Button for Android Nati
26
26
<label text =" {{ name }}" textWrap =" true" fontSize =" 18" margin =" 20" />
27
27
</list-view .itemTemplate>
28
28
</list-view >
29
- <android row =" 1" >
30
29
<FAB : fab tap =" fabTap"
31
- row =" 1"
32
- icon =" res://ic_add_white"
33
- backColor =" #ff4081"
34
- rippleColor =" #f1f1f1"
35
- class =" fab-button" />
36
- </android >
30
+ row =" 1"
31
+ icon =" res://ic_add_white"
32
+ backColor =" #ff4081"
33
+ rippleColor =" #f1f1f1"
34
+ class =" fab-button" />
37
35
</grid-layout >
38
36
</Page >
39
37
```
38
+ PLEASE NOTE: The fab is on the same ** row number** as the listview
39
+ ***
40
40
41
41
#### CSS
42
42
I recommend the following CSS styles.
43
43
``` CSS
44
44
.fab-button {
45
45
height : 70 ;
46
- horizontal-align : right ;
47
- vertical-align : bottom ;
48
46
margin : 15 ;
47
+ horizontal-align : right ; /* Android Only */
48
+ vertical-align : bottom ; /* Android Only */
49
+ background-color : #ff4081 ; /* iOS Only */
50
+ color : #fff ; /* iOS Only */
49
51
}
50
52
```
51
53
54
+ ***
55
+
52
56
#### JS
53
57
54
58
``` JS
55
- function fabTap (args ) {
56
- console .log (' tapped' );
57
- }
59
+ function fabTap (args ) {
60
+ console .log (' tapped' );
61
+ }
58
62
exports .fabTap = fabTap;
59
63
```
60
64
61
- #### Attributes
65
+ ***
66
+
67
+ ## Attributes
62
68
** backColor** - optional
63
69
64
- Attribute to specify the background color of the FAB
70
+ Background color of the FAB
71
+
72
+ ### Android Specific Attributes
73
+ ** icon** - required
65
74
66
- ** rippleColor** - optional
75
+ Icon to use for the FAB button, supports the same image source options that NativeScript images support.
76
+
77
+ ** rippleColor** - optional
78
+
79
+ Ripple color on lollipop devices, it will fill the FAB on pre-lollipop devices
67
80
68
- Attribute to set the ripple color on lollipop devices, it will fill the FAB on pre-lollipop devices
69
81
70
- ** icon** - required
71
82
72
- Attribute to specify which icon to use for the FAB button, supports the same image source options that NativeScript images support.
73
83
74
84
### Contributors
75
85
76
86
- L�zaro Danillo [ lazaromenezes] ( https://github.com/lazaromenezes )
87
+ - Steve McNiven-Scott [ sitefinitysteve] ( https://github.com/sitefinitysteve ) - iOS
0 commit comments