(Resolved) Has anyone gotten actionbar buttons to appear with Android?
-
I've got a action bar displaying but the button I add doesn't appear. The menu xml file is being inflated when onCreateOptions runs for the QtActivity object. The button can be retrived from the menu and it says it is enabled and visible.
If I store the menu object and look at it after that function call, the button is suddenly missing. After looking at Qt source code I saw the file QtActivityDelegate.java also has the onCreateOptions function. That one calls clear on the menu passed.
This makes me think that is wiping out my menu changes, so I'm curious if anyone else has had this issue and if that is the cause.
-
It turns out the problem is caused by a function in QtActivity.java.
onPrepareOptionsMenuThat function runs after I set the menu button. Something it calls wipes out my changes. I was able to get around it by commenting out the function contents and just returning true.
I've noticed that doing this makes the action bar show up when the program first starts up. Previously it would hide.