B4J Question [SOLVED] [ABMaterial] No Sidebar Icon for Mini Template?

incendio

Well-Known Member
Licensed User
Longtime User
Hi guys,

I have follow the sample from this thread

Sample can run OK, but when tried to add an icon to sidebar which these codes
B4X:
Sub ConnectNavigationBar(page As ABMPage) 'ignore
    ' Clear the dummies we created in BuildNavigationBar
    page.NavigationBar.Clear
    
    ' add the menus to your sidebar
    ' examples
    page.NavigationBar.AddSideBarItem( "About", "About", "mdi-action-dashboard", "../ABMPageTemplate")
        
    page.NavigationBar.Refresh ' IMPORTANT
End Sub

The item is displayed but the icon didn't.

Is this normal or there is something wrong with my codes?
 

alwaysbusy

Expert
Licensed User
Longtime User
Works fine here. The only thing I can think of is that you are running it in Release mode before running it at least once in Debug mode: this is needed because icons are put in the .needs files in debug mode as in Release mode, the source code is not available to find which icons you used. So, also when deploying, do not forget to copy the .needs files next to the jar!

1609573992110.png


Alwaysbusy
 
Upvote 0

incendio

Well-Known Member
Licensed User
Longtime User
Ran in Debug mode, got error, something about access denied to Template.jar.

Ran again in Relase mode, no errors, and worked as expected :)

Thanks for the hint.
 
Upvote 0
Top