Anyone know if I can disable a button in my stdActionBar? I have an ok/cancel panel showing to the user and do not want them to be able to click the buttons in the Action Bar.. Or if I can make my panel full screen which covers the Action Bar, that would work also..
Can I change the menuitem icons at runtime? If not is there a lib which will let me change a menu icon at runtime so I can indicate to the user of a change in a status?
I have added this code into my app and have now got an icon in my action bar.. The icon shows on the left after the action bar title but all of my other icons are on the right. How can I move the icon across to the right and do you suggest to use this method for all of my icons instead of the addmenuitem etc?
Thank you!
Derek
B4X:
edtTeste.Initialize("")
edtTeste.SetBackgroundImage(LoadBitmap(File.DirAssets,"ic_restore_white_24dp.png"))
Dim jo As JavaObject = ActionBar
jo = jo.GetField("bar")
jo.RunMethod("setDisplayShowCustomEnabled", Array As Object(True))
jo.RunMethod("setCustomView", Array As Object(edtTeste))
edtTeste.Width = 4%y
End Sub
Try to add a panel and then add the icons to the panel. Yes, you should add such buttons instead of the standard menu items if you want to replace them at runtime.