Search code examples
androideclipseeclipse-juno

how to disable onCreateOptionsMenu


I just started using Juno, and I was wondering what this method is really about. And since I

dont use it, I dont want it to create every time i create a project. How can I disable her?

 @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;

Solution

  • All this does is create your menu that shows up when you press the menu key. It may also show up in the action bar depending on how your app is set up and the API version it is running on. It is not needed unless you have extra options that you want to show to the user in this manner.

    This method is by default created from the ADT Activity templates.