ui-material-components: Missing icons in bottom navigation bar
Usage for the bottom navigation bar says:
Before start using the plugin you need to add the icons for Android & iOS in your
App_Resources� directory.
Is there anywhere more specific documentation for that?
I tried to replicate the demo and I’m still missing the ic_home icon.
Or: is it possible to use icons from font-awesome or other icon fonts?
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 35 (28 by maintainers)
This does not work for me.
I am implementing this on Angular Projects and tried everything, but could not get this to work directly.
The only way it works is if I convert the font icon to ImageSource
and in TS,
@ray007 i found the issue! will try to fix it and release
@farfromrefug Ahh ok, I’m not super familiar with the native API, did not know that was the limiting factor here.
And @ray007 is asking how do you specify the css class that defines a
font-familyproperty. Just addingicon="font://"does not work without it.@farfromrefug I’m using
bottomnavigationbar, so it’s probably got nothing to do withisIconSizeFixed.@csimpi seems clear to me you should use something like
"font://\uf015". If it does not work with angular you are welcome to fix any angular related issue. Again i wontI’m using Vue so I can’t say much about angular. As I already wrote above, getting the actual character into the
font:url also worked (with class attribute on tag). Try@farfromrefug yes, that sounds like what I want.
But it does not seem to work. And looking through the code for
bottomnavigationbarI can’t find any mention oficonClass.Searching through the repository I found
iconClassinsrc/core/tab-navigation-base/tab-strip-item/index.ts, but that does not seem to be connected to the bottom navigationbar. And it does not seem to really be needed there…@farfromrefug I understand the theory, but the problem here is, a
<MDBottomNavigationTab>hastitleandiconattributes, andclassis not applied for theicon. At least it wasn’t last I tried, and if it was we’d probably have a problem withtitle. Did I miss something?@ray007 @ZachPerkitny i did not understand cause it was obvious to me as it works like any other component. simply apply a class to the component on which you use
icon="font://"@ZachPerkitny it is not that easy. It depends on what the native API let us do. You are welcome to have a go at it and create a PR
i found a solution to use font icons! I’m using svelte, but the bindings are similar when using vue/angular/react etc.
@farfromrefug thank you, but that’s the same link I mentioned in my last comment. And getting the icon depends on
classto select the correct font.So if there is an option to set
classfor the icon I have not yet found it.@ray007 https://docs.nativescript.org/angular/ui/ng-components/icon-fonts