Hi
i want to add a user theme selector in my app, for example i need Blue, Green, Red, Purple...
For this i need to change in B4A code some attributes of action bar and it's elements, but i don't know how to
Now i do the following code in B4XPage_Appear
to complete my request i have 2 question :
1) how to change the menuIcon Bitmap or MenuIcon color by code
2) if the code that i have posted working in b4I also
thank's
i want to add a user theme selector in my app, for example i need Blue, Green, Red, Purple...
For this i need to change in B4A code some attributes of action bar and it's elements, but i don't know how to
Now i do the following code in B4XPage_Appear
B4X:
' Set Title of page
' with a specific Textcolor -- don't require manifest and it's fine form me
Dim cs As CSBuilder
Dim ThemeTextColor As Int
Dim ActionBarCaption As String
ThemeTextColor = xui.Color_White
ActionBarCaption = "Home"
cs.Initialize.Size(22).Color(ThemeTextColor).Append(ActionBarCaption).PopAll
B4XPages.SetTitle(Me,cs)
' Set BackGround of ActionBar -- without manifest...
'Work fine in B4a but Don't know if is right on B4I
Dim cd As ColorDrawable
cd.Initialize(xui.Color_RGB(0,93,192),0)
B4XPages.GetManager.ActionBar.RunMethod("setStackedBackgroundDrawable", Array(cd))
'Set HomeIcon of ActionBar -- without manifest...
'Work fine in B4a but Don't know if is right on B4I
Dim bd As BitmapDrawable
bd.Initialize(LoadBitmap(File.DirAssets,"myGoHomeIcon.png"))
B4XPages.GetManager.ActionBar.RunMethod("setDisplayHomeAsUpEnabled", Array(True))
B4XPages.GetManager.ActionBar.RunMethod("setHomeAsUpIndicator", Array(bd))
'Set HomeIcon of ActionBar -- without manifest...
'Work fine in B4a but Don't know if is right on B4
'Force visibility of goHome Icon
B4XPages.GetManager.ActionBar.RunMethod("setDisplayShowHomeEnabled", Array(True))
to complete my request i have 2 question :
1) how to change the menuIcon Bitmap or MenuIcon color by code
2) if the code that i have posted working in b4I also
thank's