Hi all, Since the lockdown everywhere, a lot of B4X users seem to want to learn ABM to make WebApps in B4J. That is great! :) However, some seem to struggle a lot to get started. I understand, as even opening up the template can be quite overwhelming with those Cache, Root, Page etc classes...
www.b4x.com
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?
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!