Android Action Bar not showing -
i had made program code , want put action bar in top right hand corner of 1 of screen, however, action bar not show or worse, can't direct page. had tried sorts of methods have been taught online, still have same problem. can me out please?
this code having problems with:
public class playactivity extends actionbaractivity { public static final int menu_item_restart = menu.first; public static final int menu_item_clear_notes = menu.first + 1; public static final int menu_item_fill_in_notes = menu.first + 2; public static final int menu_item_undo = menu.first + 3; public static final int menu_item_help = menu.first + 4; public static final int menu_item_settings = menu.first + 5; public static final int menu_item_set_checkpoint = menu.first + 6; public static final int menu_item_undo_to_checkpoint = menu.first + 7; private static final int dialog_restart = 1; private static final int dialog_well_done = 2; private static final int dialog_clear_notes = 3; private static final int dialog_undo_to_checkpoint = 4; private static final int request_settings = 1; private imcontrolpanel mimcontrolpanel; private imcontrolpanelstatepersister mimcontrolpanelstatepersister; private impopup mimpopup; private imsinglenumber mimsinglenumber; private boolean mshowtime = true; private gametimer mgametimer; private gametimeformat mgametimeformatter = new gametimeformat(); private boolean mfullscreen; private boolean mfillinnotesenabled = false; private hintsqueue mhintsqueue; @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); sethasoptionsmenu(); // theme must set before setcontentview androidutils.setthemefrompreferences(this); setcontentview(r.layout.play); mrootlayout = (viewgroup) findviewbyid(r.id.root_layout); mtimelabel = (textview) findviewbyid(r.id.time_label); mhintsqueue = new hintsqueue(this); mgametimer = new gametimer(); mguihandler = new handler(); @override protected void onpause() { super.onpause(); // save game database might not able mdatabase.updatesudoku(msudokugame); mgametimer.stop(); mimcontrolpanel.pause(); mimcontrolpanelstatepersister.savestate(mimcontrolpanel); } @override protected void ondestroy() { super.ondestroy(); mdatabase.close(); } @override protected void onsaveinstancestate(bundle outstate) { super.onsaveinstancestate(outstate); mgametimer.stop(); } @override public boolean oncreateoptionsmenu(menu menu) { super.oncreateoptionsmenu(menu); menuinflater inflater = getmenuinflater(); inflater.inflate(r.menu.list_menu, menu); return true; } /*@override public boolean oncreateoptionsmenu(menu menu) { super.oncreateoptionsmenu(menu); menu.add(0, menu_item_undo, 0, r.string.undo) .setshortcut('1', 'u') .seticon(android.r.drawable.ic_menu_revert); menu.add(0, menu_item_restart, 1, r.string.restart) .setshortcut('7', 'r') .seticon(android.r.drawable.ic_menu_rotate); menu.add(0, menu_item_clear_notes, 0, r.string.clear_all_notes) .setshortcut('3', 'a') .seticon(android.r.drawable.ic_menu_delete); menu.add(0, menu_item_help, 1, r.string.help) .setshortcut('0', 'h') .seticon(android.r.drawable.ic_menu_help); menu.add(0, menu_item_settings, 1, r.string.settings) .setshortcut('9', 's') .seticon(android.r.drawable.ic_menu_preferences); menu.add(0, menu_item_set_checkpoint, 2, r.string.set_checkpoint); menu.add(0, menu_item_undo_to_checkpoint, 2, r.string.undo_to_checkpoint); return true; } }
has met issue? appreciated.
Comments
Post a Comment