• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps adding action item button problem in master/detail flow

I have created a project on android 3.0 version(SDK Tools rev 21 and Plat form tools 16), now I'm unable to add action item buttons in action bar my code is :

[HIGH]@Override
public boolean onCreateOptionsMenu(Menu menu) {
// TODO Auto-generated method stub

MenuItem add = menu.add("Add City");
MenuItem delete = menu.add("Delete");

add.setShowAsAction(MenuItem.SHOW_AS_ACTION_WITH_TEXT);
delete.setShowAsAction(MenuItem.SHOW_AS_ACTION_WITH_TEXT);
return super.onCreateOptionsMenu(menu);
}[/HIGH]

through this code the buttons are not visible, Please tell me how to get rid of this tiny bug. Thanks in advance.
 
Welcome to the forums arshadaliso, glad to have you here :)

I am going to move this thread into the Android Applications development forum to receive some better assistance.

Thanks for joining though and enjoy your stay :D
 
Back
Top Bottom