How do I add menu item icons in the right side of the actionbar/drawer view example?
Using B4XDrawer, the hamburger menu is on the left and it works fine.
But I need to put my dynamically changeable icons back on the right.
This is what I was using with the stock actionbar:
How do I make this work with the B4XDrawer example?
Some of the above I can probably replace with FontAwesome, I created this routine before that existed.
Using B4XDrawer, the hamburger menu is on the left and it works fine.
But I need to put my dynamically changeable icons back on the right.
This is what I was using with the stock actionbar:
B4X:
Sub SetMenuItems(ConnectionStatus As Boolean)
Dim Obj1 As Reflector
Obj1.Target = Obj1.GetActivity
Obj1.SetField2("menuItems", Null)
Select Case ConnectionStatus
Case True
Activity.AddMenuItem3("Connect", "mnuConnection", LoadBitmap(File.DirAssets, "power-green.png"), True)
Case False
Activity.AddMenuItem3("Connect", "mnuConnection", LoadBitmap(File.DirAssets, "power-red.png"), True)
End Select
Activity.AddMenuItem3("Clear Board", "mnuClear", LoadBitmap(File.DirAssets, "trash.png"), True)
' Activity.AddMenuItem3("Set Clock", "mnuSetClock", LoadBitmap(File.DirAssets, "stopwatch.png"), True)
' Activity.AddMenuItem3("Time Of Day", "mnuTimeOfDay", LoadBitmap(File.DirAssets, "clock.png"), True)
Obj1.RunMethod("invalidateOptionsMenu")
End Sub
How do I make this work with the B4XDrawer example?
Some of the above I can probably replace with FontAwesome, I created this routine before that existed.