Android Using Menus Yuliana Setiowati Rizky Yuniar Hakkun Ahmad Syauqi Ahsan 1Politeknik Elektronika Negeri Surabaya.

Slides:



Advertisements
Similar presentations
Numbers Treasure Hunt Following each question, click on the answer. If correct, the next page will load with a graphic first – these can be used to check.
Advertisements

1 A B C
Scenario: EOT/EOT-R/COT Resident admitted March 10th Admitted for PT and OT following knee replacement for patient with CHF, COPD, shortness of breath.
AP STUDY SESSION 2.
1 WORKING WITH 2007 WORD Part 1 Developed October 2007 with lots of help from.
1
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Copyright © 2003 Pearson Education, Inc. Slide 7-1 Created by Cheryl M. Hughes The Web Wizards Guide to XML by Cheryl M. Hughes.
Processes and Operating Systems
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
David Burdett May 11, 2004 Package Binding for WS CDL.
We need a common denominator to add these fractions.
1 RA I Sub-Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Casablanca, Morocco, 20 – 22 December 2005 Status of observing programmes in RA I.
Microsoft Access 2007 Advanced Level. © Cheltenham Courseware Pty. Ltd. Slide No 2 Forms Customisation.
Prepared by: Workforce Enterprise Services For: The Illinois Department of Commerce and Economic Opportunity Bureau of Workforce Development ENTRY OF EMPLOYER.
Local Customization Chapter 2. Local Customization 2-2 Objectives Customization Considerations Types of Data Elements Location for Locally Defined Data.
Create an Application Title 1Y - Youth Chapter 5.
Process a Customer Chapter 2. Process a Customer 2-2 Objectives Understand what defines a Customer Learn how to check for an existing Customer Learn how.
Custom Statutory Programs Chapter 3. Customary Statutory Programs and Titles 3-2 Objectives Add Local Statutory Programs Create Customer Application For.
Custom Services and Training Provider Details Chapter 4.
Add Governors Discretionary (1G) Grants Chapter 6.
CALENDAR.
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt BlendsDigraphsShort.
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt RhymesMapsMathInsects.
1 Click here to End Presentation Software: Installation and Updates Internet Download CD release NACIS Updates.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Windows XP Project An Introduction to Microsoft Windows XP and Office 2003.
Photo Slideshow Instructions (delete before presenting or this page will show when slideshow loops) 1.Set PowerPoint to work in Outline. View/Normal click.
1. PHOTO INDEX Bayside: Page 5-7 Other Colour Leon: Page 8-10 Cabrera Page Canaria Page Driftwood Page 16 Florence Florence and Corfu Page.
Break Time Remaining 10:00.
Turing Machines.
Table 12.1: Cash Flows to a Cash and Carry Trading Strategy.
PP Test Review Sections 6-1 to 6-6
Bright Futures Guidelines Priorities and Screening Tables
EIS Bridge Tool and Staging Tables September 1, 2009 Instructor: Way Poteat Slide: 1.
Bellwork Do the following problem on a ½ sheet of paper and turn in.
Operating Systems Operating Systems - Winter 2012 Chapter 4 – Memory Management Vrije Universiteit Amsterdam.
Operating Systems Operating Systems - Winter 2010 Chapter 3 – Input/Output Vrije Universiteit Amsterdam.
Exarte Bezoek aan de Mediacampus Bachelor in de grafische en digitale media April 2014.
TESOL International Convention Presentation- ESL Instruction: Developing Your Skills to Become a Master Conductor by Beth Clifton Crumpler by.
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
 Copyright I/O International, 2013 Visit us at: A Feature Within from Item Class User Friendly Maintenance  Copyright.
1 RA III - Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Buenos Aires, Argentina, 25 – 27 October 2006 Status of observing programmes in RA.
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
1..
CONTROL VISION Set-up. Step 1 Step 2 Step 3 Step 5 Step 4.
Adding Up In Chunks.
MaK_Full ahead loaded 1 Alarm Page Directory (F11)
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt Synthetic.
: 3 00.
5 minutes.
1 hi at no doifpi me be go we of at be do go hi if me no of pi we Inorder Traversal Inorder traversal. n Visit the left subtree. n Visit the node. n Visit.
1 Let’s Recapitulate. 2 Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
Speak Up for Safety Dr. Susan Strauss Harassment & Bullying Consultant November 9, 2012.
Essential Cell Biology
Converting a Fraction to %
Clock will move after 1 minute
PSSA Preparation.
Chapter 11 Creating Framed Layouts Principles of Web Design, 4 th Edition.
Essential Cell Biology
Immunobiology: The Immune System in Health & Disease Sixth Edition
Chapter 13 Web Page Design Studio
Physics for Scientists & Engineers, 3rd Edition
Energy Generation in Mitochondria and Chlorplasts
Select a time to count down from the clock above
Copyright Tim Morris/St Stephen's School
1.step PMIT start + initial project data input Concept Concept.
Android Using Menus Notes are based on: The Busy Coder's Guide to Android Development by Mark L. Murphy Copyright © CommonsWare, LLC. ISBN:
Politeknik Elektronika Negeri Surabaya
Presentation transcript:

Android Using Menus Yuliana Setiowati Rizky Yuniar Hakkun Ahmad Syauqi Ahsan 1Politeknik Elektronika Negeri Surabaya

Outline ContextMenu OptionMenu 2Politeknik Elektronika Negeri Surabaya

Using Menus Menus is not consuming ‘much’ view space. Android provides two types of menu known as: options menu and context menu. – The options menu is triggered by pressing the hardware Menu button on the device, while – The context menu is raised by a tap-and-hold on the widget associated to the menu. 3Politeknik Elektronika Negeri Surabaya

Using Menus Example: Using an option menu Options available in this context Press Menu Button A max of six entries per menu. Excess will be displayed as part of the More option 4Politeknik Elektronika Negeri Surabaya

Using Menus Example: Using an option menu Available Options in this context Press Menu button 5Politeknik Elektronika Negeri Surabaya

Using Menus Example : Dealing with SMS (text-messages) by using the built-in Messaging app’s context menu Tap-&-Hold 6Politeknik Elektronika Negeri Surabaya

Using Menus Comments on Creating Context Menu Indicate which widget(s) on your activity have context menus. To do this, call registerForContextMenu(theWidget) supplying the View that is the widget needing a context menu. Implement onCreateContextMenu(…) To find out when a context menu choice was chosen, implement onContextItemSelected() on the activity. 7Politeknik Elektronika Negeri Surabaya

Using Menus Comments on Creating Option Menu Pressing the hardware Menu button on the device. Implement onCreateOptionMenu(…) To find out when a option menu choice was chosen, implement onOptionItemSelected() on the activity. 8Politeknik Elektronika Negeri Surabaya

Using Menus Example 1 Example 1: Using an Option Menu In this application the Option menu offers a way of changing the text size (on both EditText boxes) Click on Menubutton to see size options After choosing option: 50 points 9Politeknik Elektronika Negeri Surabaya

Using Menus Example 1 Example 1: Using an Option Menu Up to six options will be displayed on the Option menu. If there are more than six options pushing the More button will show the rest Click the More button to see additional options Additional choices of the Option menu 10Politeknik Elektronika Negeri Surabaya

Using Menus Example 1 Example 1: Using a Context Menu Each view could have an associated Context Menu Long-press a textbox to invoke its Context Menu 11Politeknik Elektronika Negeri Surabaya

Using Menus Example 1 Example 1: Using Option and Context Menu The app shows two text boxes. Menus are used to change text’s size, color, and style. 12Politeknik Elektronika Negeri Surabaya

Using Menus Example 1 Example 1: Using Option and Context Menu The app shows two text boxes. Menus are used to change text’s size, color, and style. 13Politeknik Elektronika Negeri Surabaya

Using Menus Example 1 Example 1: Using Option and Context Menu The app shows two text boxes. Menus are used to change text’s size, color, and style. 14Politeknik Elektronika Negeri Surabaya

Using Menus Example 1 Example 1: Using Option and Context Menu The app shows two text boxes. Menus are used to change text’s size, color, and style. 15Politeknik Elektronika Negeri Surabaya

Using Menus Example 1 Example 1: Using Option and Context Menu The app shows two text boxes. Menus are used to change text’s size, color, and style. 16Politeknik Elektronika Negeri Surabaya

Using Menus Example 1 Example 1: Using Option and Context Menu The app shows two text boxes. Menus are used to change text’s size, color, and style. 17Politeknik Elektronika Negeri Surabaya

Using Menus Example 1 Example 1: Using Option and Context Menu The app shows two text boxes. Menus are used to change text’s size, color, and style. 18Politeknik Elektronika Negeri Surabaya

Using Menu Example 2 Example 2: Enhancing Option/Context Menu This extension of the previous example adds icons and links to the Option Menu entries, as well as a sub-menu list tied to one the option menu buttons. Click on SubMenu to see additional options 19Politeknik Elektronika Negeri Surabaya

Using Menu Example 2 Example 2: Enhancing Option/Context Menu This extension of the previous example adds icons and linksto the Option Menu entries, as well as a sub-menu list tied to one the option menu buttons. 20Politeknik Elektronika Negeri Surabaya

Using Menu Example 2 Example 2: Enhancing Option/Context Menu Replace the method populateMyFirstMenu with the following code 21Politeknik Elektronika Negeri Surabaya

Using Menu Example 2 Example 2: Enhancing Option/Context Menu Continuation… Replace the method populateMyFirstMenu with the following code 22Politeknik Elektronika Negeri Surabaya

Using Menu Example 2 Example 2: Enhancing Option/Context Menu Continuation… Replace the method applyMenuOption with the following code 23Politeknik Elektronika Negeri Surabaya

Using Menu Example 2 Example 2: Enhancing Option/Context Menu Continuation… Replace the method applyMenuOption with the following code Same as before 24Politeknik Elektronika Negeri Surabaya

Using Menu Comments on Creating Submenus Submenus are displayed as regular Menus Items. When selected they just display more options. To avoid cluttered UIs, submenus are not displayed using three-like structure, instead they appear as a simple floating window presenting a list of items. Android does not support nested submenus. 25Politeknik Elektronika Negeri Surabaya

Using Menu Comments on Creating Submenus Example: Extend previous example by adding a fifth entry to the existing menu list. The new entry is of the SubMenutype. It should offer three options of its own. Note: add this code to the end of the: onCreateOptionsMenu(…)method. 26Politeknik Elektronika Negeri Surabaya

Using Menu Example 3 Example 3: Using Option/Context Menu Observe how the selection made from the Menu changes the inter-row spacing of the ListView. Click on Menu to see spacing options After choosing option: 24 Pixels of row separation 27Politeknik Elektronika Negeri Surabaya

Using Menu Example 3 Example 3: Using Option After choosing option: More a new menu is shown Click on Menu to see spacing options 28Politeknik Elektronika Negeri Surabaya

Using Menu Example 3 Example 3: Using a Context Menu Choices listed in a floating ListView Tap & Hold any row to bring Context Menu 29Politeknik Elektronika Negeri Surabaya

Using Menu Example 3 Example 3: Creating an Option & Context Menu 30Politeknik Elektronika Negeri Surabaya

Using Menu Example 3 Example 3: Creating an Option & Context Menu 31Politeknik Elektronika Negeri Surabaya

Using Menu Example 3 Example 3: Creating an Option & Context Menu 32Politeknik Elektronika Negeri Surabaya

Using Menu Example 3 Example 3: Creating an Option & Context Menu 33Politeknik Elektronika Negeri Surabaya

Using Menu Example 3 Example 3: Creating an Option & Context Menu 34Politeknik Elektronika Negeri Surabaya

Using Menu Example 3 Example 3: Creating an Option & Context Menu 35Politeknik Elektronika Negeri Surabaya

Using Menu Example 3 Example 3: Creating an Option & Context Menu 36Politeknik Elektronika Negeri Surabaya

Using Menu Example 3 Example 3: Creating an Option & Context Menu 37Politeknik Elektronika Negeri Surabaya

Using Menu Example 3 Example 3: Creating an Option & Context Menu 38Politeknik Elektronika Negeri Surabaya

Using Menu Example 4 Example 4: Another App Using Menus that include Icons & Text This is a simple application designed around a TableLayout. 1. The first row shows a summary of the data collected from the screen. 2. The second row exposes a RadioGroupand a textBox. 3. The third row shows a list of the calls made to the option and context menus. This Option Menu shows its options using text & icons 39Politeknik Elektronika Negeri Surabaya

Using Menu Example 4 Example 4: Another App Using Menus that include Icons & Text Application’s Layout 40Politeknik Elektronika Negeri Surabaya

Using Menu Example 4 Example 4: Another App Using Menus that include Icons & Text Application’s Layout. Hierarchy View 41Politeknik Elektronika Negeri Surabaya

Using Menu Example 4 42Politeknik Elektronika Negeri Surabaya

Using Menu Example 4 43Politeknik Elektronika Negeri Surabaya

Using Menu Example 4 44Politeknik Elektronika Negeri Surabaya

Using Menu Example 4 45Politeknik Elektronika Negeri Surabaya

Using Menu Example 4 Example 4. Menu Using Icons & Text This custom layout (main1.xml) is used to show the ListView rows (shown as red rows –big font ) 46Politeknik Elektronika Negeri Surabaya

Using Menu Example 4 Example 4. Menu Using Icons & Text 47Politeknik Elektronika Negeri Surabaya

Using Menu Example 4 Example 4. Menu Using Icons & Text 48Politeknik Elektronika Negeri Surabaya

Using Menu Example 4 Example 4. Menu Using Icons & Text 49Politeknik Elektronika Negeri Surabaya

Using Menu Example 4 Example 4. Menu Using Icons & Text 50Politeknik Elektronika Negeri Surabaya

Using Menu Example 4 Example 4. Menu Using Icons & Text 51Politeknik Elektronika Negeri Surabaya

Using Menu Example 4 Example 4. Menu Using Icons & Text 52Politeknik Elektronika Negeri Surabaya

Using Menu Comments on Creating Submenus Example: Extend previous example by adding a fifth entry to the existing menu list. The new entry is of the SubMenutype. It should offer three options of its own. 53Politeknik Elektronika Negeri Surabaya