File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414 row =" 1"
1515 icon =" res://ic_add_white"
1616 tap =" fabTap"
17- rippleColor =" blue "
17+ rippleColor =" #ffffff "
1818 class =" fab-button" />
1919 </grid-layout >
2020</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+ }
1515}
Original file line number Diff line number Diff line change @@ -101,13 +101,20 @@ function onIconPropertyChanged(data) {
101101
102102 if ( ImageSource . isFileOrResourcePath ( icon ) ) {
103103 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 {
107110 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+ }
111118}
112119common . Fab . iconProperty . metadata . onSetNativeValue = onIconPropertyChanged ;
113120
@@ -117,6 +124,8 @@ function onRippleColorPropertyChanged(data) {
117124 var fab = data . object ;
118125 var droidColor = new color . Color ( data . newValue ) . android ;
119126 fab . android . setRippleColor ( droidColor ) ;
127+ } else {
128+ console . log ( "The ripple color: " + data . newValue + " is invalid." ) ;
120129 }
121130}
122131common . Fab . rippleColorProperty . metadata . onSetNativeValue = onRippleColorPropertyChanged ;
Original file line number Diff line number Diff line change 11{
22 "name" : " nativescript-floatingactionbutton" ,
3- "version" : " 0.2.01 " ,
3+ "version" : " 0.2.2 " ,
44 "description" : " A NativeScript plugin to provide an XML widget to implement the Material Design Floating Action Button in NativeScript apps." ,
55 "main" : " fab.js" ,
66 "nativescript" : {
3737 ],
3838 "license" : " Apache-2.0" ,
3939 "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"
4441}
You can’t perform that action at this time.
0 commit comments