Android Question StdActionBar

Derek Jee

Active Member
Licensed User
Longtime User
Hi there

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..

Thank you :))

Derek.
 

Derek Jee

Active Member
Licensed User
Longtime User
Does this also mean that I cannot change any icons at runtime?

Thank you again..
 
Upvote 0

Derek Jee

Active Member
Licensed User
Longtime User
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?

Thank you
 
Last edited:
Upvote 0

Derek Jee

Active Member
Licensed User
Longtime User
Thank you for confirming Erel.. Any chance there is some code showing this or similar somewhere?
 
Upvote 0

Derek Jee

Active Member
Licensed User
Longtime User
Thank you Erel

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
 
Upvote 0

Derek Jee

Active Member
Licensed User
Longtime User
Super!!!! It worked a treat, thank you..
 
Upvote 0
Top