Duration: 18:28 min
Summary: In this lesson, we will talk about menus. First, we will see how the screen is structured, and where the action bar is (the menu is part of the action bar). Then, we will investigate the file structure and learn about the Java code and the resources. The menu in this example exists in meny_main.xml. We will add two options to the menu: one that shows a toast and another that exits the activity. After adding the menu options, we will turn to the Java code to add handlers to the menu options. Now, when the user clicks on ‘”Toast” a toast is displayed, and when he/she clicks on “Exit”, we terminate the activity.