diff --git a/e2e/ui-tests-app/app/action-bar/font-icons-page.xml b/e2e/ui-tests-app/app/action-bar/font-icons-page.xml index 8ffe23323..0bfedfb15 100644 --- a/e2e/ui-tests-app/app/action-bar/font-icons-page.xml +++ b/e2e/ui-tests-app/app/action-bar/font-icons-page.xml @@ -1,6 +1,7 @@ + diff --git a/tns-core-modules/ui/action-bar/action-bar.android.ts b/tns-core-modules/ui/action-bar/action-bar.android.ts index 0b1b82b10..fc6a3fc50 100644 --- a/tns-core-modules/ui/action-bar/action-bar.android.ts +++ b/tns-core-modules/ui/action-bar/action-bar.android.ts @@ -227,9 +227,21 @@ export class ActionBar extends ActionBarBase { } } else if (navButton.icon) { - let drawableOrId = getDrawableOrResourceId(navButton.icon, appResources); - if (drawableOrId) { - this.nativeViewProtected.setNavigationIcon(drawableOrId); + if (isFontIconURI(navButton.icon)) { + const fontIconCode = navButton.icon.split("//")[1]; + const font = navButton.style.fontInternal; + const color = navButton.style.color; + const is = fromFontIconCode(fontIconCode, font, color); + + if (is && is.android) { + const drawable = new android.graphics.drawable.BitmapDrawable(appResources, is.android); + this.nativeViewProtected.setNavigationIcon(drawable); + } + } else { + let drawableOrId = getDrawableOrResourceId(navButton.icon, appResources); + if (drawableOrId) { + this.nativeViewProtected.setNavigationIcon(drawableOrId); + } } }