File tree Expand file tree Collapse file tree 4 files changed +32
-26
lines changed Expand file tree Collapse file tree 4 files changed +32
-26
lines changed Original file line number Diff line number Diff line change 14
14
row =" 1"
15
15
icon =" res://ic_add_white"
16
16
tap =" fabTap"
17
- rippleColor =" blue "
17
+ rippleColor =" #ffffff "
18
18
class =" fab-button" />
19
19
</grid-layout >
20
20
</Page >
Original file line number Diff line number Diff line change 1
- {
2
- "nativescript" : {
3
- "id" : " org.nativescript.floatingactionbutton" ,
4
- "tns-android" : {
5
- "version" : " 1.6.0 "
6
- },
7
- "tns-ios" : {
8
- "version" : " 1.6.0"
9
- }
10
- },
11
- "dependencies" : {
12
- "nativescript-floatingactionbutton" : " file:.." ,
13
- "tns-core-modules" : " latest"
14
- }
1
+ {
2
+ "nativescript" : {
3
+ "id" : " org.nativescript.floatingactionbutton" ,
4
+ "tns-android" : {
5
+ "version" : " 1.6.1 "
6
+ },
7
+ "tns-ios" : {
8
+ "version" : " 1.6.0"
9
+ }
10
+ },
11
+ "dependencies" : {
12
+ "nativescript-floatingactionbutton" : " file:.." ,
13
+ "tns-core-modules" : " latest"
14
+ }
15
15
}
Original file line number Diff line number Diff line change @@ -101,13 +101,20 @@ function onIconPropertyChanged(data) {
101
101
102
102
if ( ImageSource . isFileOrResourcePath ( icon ) ) {
103
103
iconDrawable = ImageSource . fromFileOrResource ( icon ) ;
104
- fab . android . setImageBitmap ( iconDrawable . android ) ;
105
- }
106
- else {
104
+ if ( iconDrawable ) {
105
+ fab . android . setImageBitmap ( iconDrawable . android ) ;
106
+ } else {
107
+ console . log ( "The icon: " + icon + " was not found. Check your XML icon property." ) ;
108
+ }
109
+ } else {
107
110
var drawableId = android . content . res . Resources . getSystem ( ) . getIdentifier ( icon , "drawable" , "android" ) ;
108
- iconDrawable = android . content . res . Resources . getSystem ( ) . getDrawable ( drawableId ) ;
109
- fab . android . setImageDrawable ( iconDrawable ) ;
110
- }
111
+ iconDrawable = android . content . res . Resources . getSystem ( ) . getDrawable ( drawableId ) ;
112
+ if ( iconDrawabele ) {
113
+ fab . android . setImageDrawable ( iconDrawable ) ;
114
+ } else {
115
+ console . log ( "The icon: " + icon + " was not found. Check your XML icon property." ) ;
116
+ }
117
+ }
111
118
}
112
119
common . Fab . iconProperty . metadata . onSetNativeValue = onIconPropertyChanged ;
113
120
@@ -117,6 +124,8 @@ function onRippleColorPropertyChanged(data) {
117
124
var fab = data . object ;
118
125
var droidColor = new color . Color ( data . newValue ) . android ;
119
126
fab . android . setRippleColor ( droidColor ) ;
127
+ } else {
128
+ console . log ( "The ripple color: " + data . newValue + " is invalid." ) ;
120
129
}
121
130
}
122
131
common . Fab . rippleColorProperty . metadata . onSetNativeValue = onRippleColorPropertyChanged ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " nativescript-floatingactionbutton" ,
3
- "version" : " 0.2.01 " ,
3
+ "version" : " 0.2.2 " ,
4
4
"description" : " A NativeScript plugin to provide an XML widget to implement the Material Design Floating Action Button in NativeScript apps." ,
5
5
"main" : " fab.js" ,
6
6
"nativescript" : {
37
37
],
38
38
"license" : " Apache-2.0" ,
39
39
"bugs" : " https://github.com/bradmartin/nativescript-floatingactionbutton/issues" ,
40
- "homepage" : " https://github.com/bradmartin/nativescript-floatingactionbutton" ,
41
- "dependencies" : {
42
- "tns-core-modules" : " ^1.6.0"
43
- }
40
+ "homepage" : " https://github.com/bradmartin/nativescript-floatingactionbutton"
44
41
}
You can’t perform that action at this time.
0 commit comments