Android Menu

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Syntax

  • inflater.inflate(R.menu.your_xml_file, menu);

Parameters

ParameterDescription
inflate(int menuRes, Menu menu)Inflate a menu hierarchy from the specified XML resource.
getMenuInflater ()Returns a MenuInflater with this context.
onCreateOptionsMenu (Menu menu)Initialize the contents of the Activity's standard options menu. You should place your menu items in to menu.
onOptionsItemSelected (MenuItem item)This method is called whenever an item in your options menu is selected

Remarks

To know more about Menus, read this. Hope it helps!



Got any Android Question?