Android Question Use ACToolBar to change Menu Icon

beeblomarv

Member
Licensed User
Longtime User
hello,
i want to change the icon on the actoolbar-
I want to to do sth like this :

Sub Activity_CreateMenu(Menu As ACMenu)
Menu.Clear
Dim item As ACMenuItem
Menu.Add2(20, 2, "Connect", xml.GetDrawable("bluetooth_on")).ShowAsAction = item.SHOW_AS_ACTION_ALWAYS

End Sub

Then press a button and change the image --> bluetooth_off

Sub Button_Click
Toolbar.Menu.Add2(20, 2, "Connect", xml.GetDrawable("bluetooth_off")).ShowAsAction = item.SHOW_AS_ACTION_ALWAYS

End Sub

This ofcourse doesn't work!!!! because it instead of changing the bluetooth icon it instead puts another one right next to it -
Any idea how to make it work
 
Last edited:
Top