Android Question [B4XPages] Change action bar background color

lucasheer

Active Member
Licensed User
Longtime User
Hello!

Is there a way to change the action bar background color in Android during runtime in B4XPages?

My app uses a ton of different action bar colors, I set in B4i using this:
B4X:
Dim no As NativeObject = nav
no.GetField("navigationBar").RunMethod("setBarStyle:", Array(1))
no.GetField("navigationBar").SetField("barTintColor", no.ColorToUIColor(clr))

Thank you!
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
 
Upvote 0

lucasheer

Active Member
Licensed User
Longtime User

Perfect, thank you!

Is it possible to center the text like B4i as well?
 
Upvote 0
Top