Android Question [Solved] Icons on B4Xpages Action Bar??

MikeCLX

Member
Licensed User
Longtime User
How do we create icon buttons on the B4Xpages toolbar header, action bar, or whatever its called (the bit at the top of the screen)
i have a hamburger on the left and it opens a B4XDrawer that all works great

I Ideally would like a Title and SubTitle on the header but see this works in APPCompat but cant see how to make it work in B4Xpages

The main thing i am after is to have 2 or 3 icons on the Right hand side that can do something when i click on them. and to be able to add and remove them at runtime
kind of like this:
1627102899928.png



I have searched and searched and looked at tons of code over the last 6 hours but just cant figure out how to do it.

The ultimate solution for me would be to also have an animated Hamburger to Arrow animation when i open my B4Xdrawer.

Thanks for any assistance :)

Mike
 

Peter Simpson

Expert
Licensed User
Longtime User
What something like this @MikeCLX?

 
Upvote 0

MikeCLX

Member
Licensed User
Longtime User
Yeah i spent a bit of time looking at this one but it predates b4xpages, maybe I’m just missing the obvious but its hard to understand where the new and old can and cannot mix
 
Upvote 0

MikeCLX

Member
Licensed User
Longtime User
Yes i can confirm that this works, I had tried something close to this hours ago but it was the AddToBar that i was missing...
 
Upvote 0

MikeCLX

Member
Licensed User
Longtime User
While I Can add Icons i cannot remove them. so the fight goes on...
I have opened a separate thread for doing it with AppCompat i have split my project into two one using App compat and the other not, this is the Not thread...

So to recap, I can add icons using b4XPages, but i cannot then edit or remove them.

apparently its not meant to be the done thing to use AppCompat with B4XPages so my preference is to just do it with B4Xpages directly
 
Upvote 0
Top