File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
tns-core-modules/ui/action-bar Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -227,9 +227,21 @@ export class ActionBar extends ActionBarBase {
227
227
}
228
228
}
229
229
else if ( navButton . icon ) {
230
- let drawableOrId = getDrawableOrResourceId ( navButton . icon , appResources ) ;
231
- if ( drawableOrId ) {
232
- this . nativeViewProtected . setNavigationIcon ( drawableOrId ) ;
230
+ if ( isFontIconURI ( navButton . icon ) ) {
231
+ const fontIconCode = navButton . icon . split ( "//" ) [ 1 ] ;
232
+ const font = navButton . style . fontInternal ;
233
+ const color = navButton . style . color ;
234
+ const is = fromFontIconCode ( fontIconCode , font , color ) ;
235
+
236
+ if ( is && is . android ) {
237
+ const drawable = new android . graphics . drawable . BitmapDrawable ( appResources , is . android ) ;
238
+ this . nativeViewProtected . setNavigationIcon ( drawable ) ;
239
+ }
240
+ } else {
241
+ let drawableOrId = getDrawableOrResourceId ( navButton . icon , appResources ) ;
242
+ if ( drawableOrId ) {
243
+ this . nativeViewProtected . setNavigationIcon ( drawableOrId ) ;
244
+ }
233
245
}
234
246
}
235
247
You can’t perform that action at this time.
0 commit comments