adding action item button problem in master/detail flow

Discussion in 'Application Development' started by arshadaliso, Nov 20, 2012.

  1. arshadaliso

    arshadaliso New Member
    5

    Nov 20, 2012
    1
    0
    5
    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
    853

    Sep 5, 2012
    12,647
    3,553
    853
    Male
    Civil Engineer
    Cincinnati, Ohio
    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

Loading...