B4J Question [ABMaterial] Some icons don't work

rbirago

Active Member
Licensed User
Longtime User
I have tried various icons in NavigationBar without problems (mdi-action-help, mdi-action-exit-to-app, etc.) but some others (from the same awesome's list) don't work (ie. mdi-content-save, mdi-communication-form, etc.). Where's the trick?
thanks
Roberto
 

Harris

Expert
Licensed User
Longtime User
(from the same awesome's list) - Do you mean Font Awesome?

"fa fa-arrows-v"

Font Awesome fonts are prefixed with "fa " - as in - "fa fa-arrows-v"
as in:

page.NavigationBar.InitializeExtraHalfButton("ExtraButton", "fa fa-arrows-v", ABM.BUTTONSIZE_NORMAL, ABM.HALFBUTTON_RIGHT, "btngreen")



"mdi-action-exit-to-app" ("mdi" prefix) are material icons...

Nice to see you are learning the framework. Like Font Awesome - ABM is awesome....
 
Last edited:
Upvote 0

Harris

Expert
Licensed User
Longtime User
but some others (from the same awesome's list) don't work (ie. mdi-content-save, mdi-communication-form, etc.). Where's the trick?

Yep - very confusing without code...
Making statements without supporting code makes us looking into our crystal ball. And we won't spend much time there - cause it is very cloudy.. No results appear.
I always refer to the link you listed above when I need to refer to material icons - always work as expected...
 
Upvote 0

rbirago

Active Member
Licensed User
Longtime User
I think that The trick is caused by the list (not Awesome, my mistake) that I used to pickup the proper icons.
Probably it is not true that some of the listed icons of the site
http://prd.one-two.com:51042/demo/IconsPage/abmaterial-material-icons.html
are correct. Looking at other lists on the net I have not found for example any mdi-communication....icon.
So, where can I find a valid icon list?
Look at this varied lines of the basic Master Template Project sample:
B4X:
Sub ConnectNavigationBar(page As ABMPage) 'ignore   
    ' Clear the dummies we created in BuildNavigationBar
    page.NavigationBar.Clear
    

    ' add NavigationBar items
    ' direct the nav to an associated page in the last parameter - "../AboutPage"
    page.NavigationBar.AddSideBarItem( "About",   "About / Help", "mdi-communication-chat",   "../AboutPage")
    page.NavigationBar.AddSideBarDivider

    page.NavigationBar.AddSideBarItem( "Reports",   "Template Page", "mdi-communication-form",  "../ABMPageTemplate")
    page.NavigationBar.AddSideBarDivider


    ' these menu items just raise an error because they do not have a valid url!
    page.NavigationBar.AddSideBarItem(   "Config", "Configure App", "mdi-action-settings-applications",  "")
    page.NavigationBar.AddSideBarSubItem("Config", "Company",  "Setup Company", "mdi-action-home", "")
    page.NavigationBar.AddSideBarSubItem("Config", "Users",  "Setup Users", "mdi-action-account-circle", "")
        
    page.NavigationBar.AddSideBarDivider

    page.NavigationBar.AddSideBarItem(   "Apps", "Applications", "mdi-navigation-apps",  "")
    page.NavigationBar.AddSideBarSubItem("Apps",  "Tickets", "Download Stuff Page"   , "mdi-action-receipt","")
    page.NavigationBar.AddSideBarSubItem("Apps",  "ECMviol", "Show Google Map", "mdi-action-trending-down", "")
    page.NavigationBar.AddSideBarSubItem("Apps",  "GEOZone", "I Like Charts", "mdi-action-explore", "")
    page.NavigationBar.AddSideBarSubItem("Apps",  "DLogs", "My Card Page", "mdi-action-view-list", "")
    
    ' add the LOGOUT item on the title bar....
    page.NavigationBar.AddTopItem("LogOff", "Logout", "mdi-action-exit-to-app",   "",False)
    
        
    page.NavigationBar.Refresh ' IMPORTANT
    
    
End Sub
thanks
Roberto
 
Upvote 0

mangyun

New Member
ooops! sorry, it was my mistake. Ignore the question
thank you for your time
Roberto
Hi Roberto,

What was the mistake, I'm just learning ABMaterial, some icon do show up, like "mdi-action-visibility", but some icon like "mdi-action-lock", "mdi-action-lock-open" and "mdi-image-edit" won't show up.

B4X:
    hakbtn.InitializeRaised(page, "hakbtn", "mdi-action-visibility","left","Hak Akses","")    ' ok
    resetbtn.InitializeRaised(page, "resetbtn", "mdi-action-lock","left","Reset Pass", "")    ' not showing up
 
Upvote 0

rbirago

Active Member
Licensed User
Longtime User
My mistake was this: I have stuctured the icons file names in a list to keep simpler the code, but ABMaterial has to inspect all the icons mentioned at start to load them once. I was thinking that loading was at runtime: that's the mistake. Perhaps your situation is different.
good luck
Roberto
 
Upvote 0
Top