Hello,
I currently have a hamburger image on the Action Bar, along with the app Title. I would like to add another image, my logo, to the same bar but on the right side instead of the left.
Here's the current code:
This is the code to add the hamburger to the Action Bar
The code above only allows one or the other bitmaps to be displayed and only on the left side.
How can I add the logo to the right side of the App Title?
Thanks!
Tim
I currently have a hamburger image on the Action Bar, along with the app Title. I would like to add another image, my logo, to the same bar but on the right side instead of the left.
Here's the current code:
B4X:
HamburgerIcon = xui.LoadBitmapResize(File.DirAssets, "hamburger.png", 32dip, 32dip, True)
AxcysLogo = xui.LoadBitmapResize(File.DirAssets, "AxcysICONWhole.png", 32dip, 32dip, True)
B4XPages.SetTitle(Me, "Axcys Touchless Entry")
This is the code to add the hamburger to the Action Bar
Page Created:
B4XPages.GetManager.ActionBar.RunMethod("setDisplayHomeAsUpEnabled", Array(True))
Dim bd As BitmapDrawable
bd.Initialize(HamburgerIcon)
B4XPages.GetManager.ActionBar.RunMethod("setHomeAsUpIndicator", Array(bd))
B4X:
Private Sub B4XPage_Appear
#If B4A
B4XPages.GetManager.ActionBar.RunMethod("setDisplayHomeAsUpEnabled", Array(True))
Dim bd As BitmapDrawable
bd.Initialize(HamburgerIcon)
' bd.Initialize(AxcysLogo)
B4XPages.GetManager.ActionBar.RunMethod("setHomeAsUpIndicator", Array(bd))
#End If
End Sub
The code above only allows one or the other bitmaps to be displayed and only on the left side.
How can I add the logo to the right side of the App Title?
Thanks!
Tim