Open BitterSymphony opened 9 years ago
I also have this problem. Seems that the code posted by BitterSymphony does not work and i didn't fund a way to add menu buttons to the action bar
I have this problem too.A onCreateOptionsMenu method never called on startup,but when you pressed menu button you get menu item.Weird problem.
activity.onCreateOptionsMenu = function(e){ e.menu.clear(); editButton = e.menu.add({ itemId: 1, title: "Edit", icon : '/edit.png', showAsAction : Ti.Android.SHOW_AS_ACTION_ALWAYS }); addButton = e.menu.add({ itemId: 2, title: "Edit", icon : '/camera.png', showAsAction : Ti.Android.SHOW_AS_ACTION_ALWAYS }); };
Good day Viezel :) Just wondering is it possible to add menu icons to the action bar (right hand side menu)? I was able to setTitle and set logo button successfully, just having trouble while adding menu button to the actionbar. Could you help me out? Thanks a lot!
According to the code section of 'Action Bar - REAL example'
var actionBar; // Action Bar - REAL example drawer.addEventListener('open', onNavDrawerWinOpen); function onNavDrawerWinOpen(evt) { this.removeEventListener('open', onNavDrawerWinOpen); if(this.getActivity()) { // need to explicitly use getXYZ methods actionBar = this.getActivity().getActionBar();
}