Android - Menus: - Android Apps Development Team
Android - Menus: - Android Apps Development Team
Android - Menus: - Android Apps Development Team
Lets Revise
1. What are the different types of Resources? Layout, drawable, animation, string, colors etc. 2. What is application internationalization? Application support for multiple languages 3. How the Layout resources supported for different orientations? Maintains separate layout folders, landscape and portrait modes
Agenda
1. Menus Basics 1. Options Menu 2. Context Menu 3. Submenus 2. Other Menu Features 3. Q & A
1. Menus Basics
What is a Menu? It is a mechanism to expose the applications functionality without consuming the view space Types of Menus
Options Menu: The primary menu for an Activity, which appears when the user presses the device MENU key (Menu Key on hardware device), it contains icon menu and expanded menu Context Menu: A floating list of menu items that appears when the user performs a long-press on a View Sub-menu: A floating list of menu items that the user opens by pressing a menu item in the Options Menu or a context menu
@Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.game_menu, menu); return true; }
Questions