In the res folder, make sure you have the "menu" folder .. inside this folder you need the menu.xml file ..... The XML file should contain information that looks something like this:
<menu xmlns:android="https://schemas.android.com/apk/res/android" xmlns:android1="http://schemas.android.com/apk/res/android">
You can change the section section to display your own menu.
Make sure you save the xml file ...
Then go to your main code and follow these steps:
public boolean onCreateOptionsMenu(Menu menu){ MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.menu, menu); return true; } }
how am i doing this.
source share