adding action item button problem in master/detail flow


Last Updated:

  1. arshadaliso

    arshadaliso New Member

    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.

    Advertisement
  2. Digital Controller

    Digital Controller The Real Bass Creator Guide

    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

Share This Page