CS378 - Mobile Computing More UI - Part 2. Special Menus Two special application menus – options menu – context menu Options menu replaced by action bar.

Slides:



Advertisements
Similar presentations
Chapter 1: Introduction. Contents Whats New in Dreamweaver CS4? The Dreamweaver CS4 Interface Setting Up a Site Creating a Web Page Adding Text to Your.
Advertisements

Chapter 3 – Web Design Tables & Page Layout
CE881: Mobile and Social Application Programming Simon M. Lucas Menus and Dialogs.
Android Using Menus Yuliana Setiowati Rizky Yuniar Hakkun Ahmad Syauqi Ahsan 1Politeknik Elektronika Negeri Surabaya.
ANDROID – GESTURES L. Grewe. What and why  a great way to interact with applications on mobile devices.  With a touch screen, users can easily tap,
 Options Menu ◦ The primary collection of menu items for an activity, which appears when the user touches the MENU button. When your application is running.
Mobile Development w/ MONO By: Chad W. Stoker (MCTS, MCP, MCAD) President & Chief Technology Officer Bryan E. Paslay (MCTS, MCP) Senior Consultant.
 User Interface - Raeha Sandalwala.  Introduction to UI  Layouts  UI Controls  Menus and ‘Toasts’  Notifications  Other interesting UIs ◦ ListView.
Introducing Cascading Style Sheets  Cascading Style Sheet Basics  Creating Styles  Using Styles  Manipulating Styles  Text Formatting with CSS.
Filip Debelić What is it? Android is a mobile operating system (OS) based on the Linux kernel and currently developed by Google Android,
By: Jeremy Smith.  Introduction  Droid Draw  Add XML file  Layouts  LinearLayout  RelativeLayout  Objects  Notifications  Toast  Status Bar.
Android Development (Basics)
Getting Started with Adobe Dreamweaver CS6. Unit Objectives Define web design software Start Adobe Dreamweaver CS6 View the Dreamweaver workspace Work.
Android Fragments A very brief introduction Android Fragments1.
CS378 - Mobile Computing What's Next?. Fragments Added in Android 3.0, a release aimed at tablets A fragment is a portion of the UI in an Activity multiple.
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 9: Customize! Navigating with a Master/Detail.
8 Copyright © 2004, Oracle. All rights reserved. Creating LOVs and Editors.
Win8 on Intel Programming Course Modern UI : Features Cédric Andreolli Intel Software.
Copyright ©: SAMSUNG & Samsung Hope for Youth. All rights reserved Tutorials Software: Building apps Suitable for: Advanced.
 Understanding an activity  Starting an activity  Passing information between activities  Understanding intents  Understanding the activity lifecycle.
ANDROID UI – FRAGMENTS. Fragment  An activity is a container for views  When you have a larger screen device than a phone –like a tablet it can look.
CS378 - Mobile Computing Web - WebView and Web Services.
INTRODUCTION TO HTML5 CSS Styles. Understanding Style Sheets  HTML5 enables you to define many different types of content on a web page, including headings,
Introduction to Mobile Programming. Slide 2 Overview Fundamentally, it all works the same way You get the SDK for the device (Droid, Windows, Apple) You.
MintTrack By Jeff Titus Christopher C. Wilkins Stephen Krach Pablo BajoLaso.
Tip Calculator App Building an Android App with Java © by Pearson Education, Inc. All Rights Reserved.
Chapter 5 Creating User Interfaces GOALS and OBJECTIVES Begin our application by creating our user interface. More than one way to create a user interface.
Basic Android Tutorial USF’s Association for Computing Machinery.
Website Development with Dreamweaver
@2011 Mihail L. Sichitiu1 Android Introduction GUI Menu Many thanks to Jun Bum Lim for his help with this tutorial.
Chapter 10 Fireworks: Part II The Web Warrior Guide to Web Design Technologies.
Teacher’s Assessment Assistant Worksheet Builder Starting the Program
CS378 - Mobile Computing More UI - Part 2. Special Menus Two special application menus – options menu – context menu Options menu replaced by action bar.
Programming Mobile Applications with Android September, Albacete, Spain Jesus Martínez-Gómez.
Android Boot Camp for Developers Using Java, 3E
Android – Fragments L. Grewe.
Chapter 1 Creating a Dreamweaver Web Page and Local Site
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
5-1 More UI CSNB544 Mobile Application Development Thanks to Utexas Austin.
Mobile Programming Lecture 12 HierarchyViewer, Linkify, Gestures, and Version Control.
Copyright© Jeffrey Jongko, Ateneo de Manila University Editing ListAdapter Data part 2.
Introducing Cascading Style Sheets. Cascading Style Sheet Basics  Cascading Style Sheet Basics  Creating Styles  Using Styles  Manipulating Styles.
Android Using Menus Notes are based on: The Busy Coder's Guide to Android Development by Mark L. Murphy Copyright © CommonsWare, LLC. ISBN:
Styles, Dialog Boxes, and Menus. Styles Allow creation of a common format – placed in res/values/styles.xml – file name is incidental Can be applied.
Copyright© Jeffrey Jongko, Ateneo de Manila University Deconstructing HelloWorld.
Pearson Webcast Series
CS378 - Mobile Computing User Interface Basics. User Interface Elements View – Control – ViewGroup Layout Widget (Compound Control) Many pre built Views.
More UI Action Bar, Navigation, and Fragments
Blaise Senior UX Designer at AllofUs Friend of foxes Android UI The Basics.
CHAPTER 4 Fragments ActionBar Menus. Explore how to build applications that use an ActionBar and Fragments Understand the Fragment lifecycle Learn to.
CHAPTER 7 TouchGestures. Chapter objectives: To code the detection of and response to touch gestures. Patterns of common touches to create touch gestures.
ANDROID LAYOUTS AND WIDGETS. Slide 2 Introduction Parts of the Android screen Sizing widgets and fonts Layouts and their characteristics Buttons, checkboxes.
Cosc 5/4730 Support design library. Support Design library Adds (API 9+) back support to a number of 5.0 lollipop widgets and material design pieces –
Building UI Components Димитър Н. Димитров Astea Solutions AD.
UI Redux, Navigation Patterns, Tabbed Views, Pagers, Drawers
Fragments and Menus Chapter 4 1. Objectives Learn three different types of menus: options, context, and popup Learn to configure the ActionBar and Toolbar.
CS371m - Mobile Computing Gestures. Common Gestures 2.
Menus. Menus are a common user interface component in many types of applications. The options menu is the primary collection of menu items for an activity.
TUTORIAL ON MULTITOUCH AND SWIPE GESTURES
Creation of an Android App By Keith Lynn
Mobile Application Development Chapter 4 [Android Navigation and Interface Design] IT448-Fall 2017 IT448- Fall2017.
Politeknik Elektronika Negeri Surabaya
Mobile Application Development BSCS-7 Lecture # 11
Mobile Computing With Android ACST 4550 Android Logs and Gestures
Cannon Game App Android How to Program
CS371m - Mobile Computing Gestures.
Android Developer Fundamentals V2
Mobile Programming Gestures in Android.
Mobile Programming Dr. Mohsin Ali Memon.
Mobile Programmming Dr. Mohsin Ali Memon.
Presentation transcript:

CS378 - Mobile Computing More UI - Part 2

Special Menus Two special application menus – options menu – context menu Options menu replaced by action bar (API 11) menuaction bar 2

OptionsMenu User presses Menu Button Activities onCreateOptionsMenu method is called In example options_menu.xml in res/menu folder 3

OptionsMenu Alternate creation of OptionsMenu add item to menu programmatically chained method calls 4

SubMenus Option on Menu may be creation of a SubMenu In XML nest menu inside menu or programmatically by adding SubMenus to Menu in onCreateOptionsMenu method 5

Menu Options Selected if Menu Option is another Activity it is launched when Menu button pressed – The Big About in previous example For other items – onOptionsItemSelected(MenuItem item) 6

ACTION BAR 7

ActionBar Introduced in Android 3.0 – Honeycomb, tablet only 4.0, Ice Cream Sandwich, tablet and phones "The action bar is a window feature that identifies the application and user location, and provides user actions and navigation modes" 8

Purpose of ActionBar identification navigation actions Overflow Menu Navigation Tabs Action Item Icon / Logo 9

ActionBar ActionBar items declared in menu.xml 10

ActionBar If menu items declared in xml, added to menu in order they appear Extra items brought up with menu button 11

Navigation Tabs Used to switch between fragments 12

ContextMenu pre 3.0, aka Floating Menus subtype of Menu display when a long press is performed on a View – Activity is a descendant of View – Activity may be broken up into multiple views implement onCreateContextMenu method must call registerForContextMenu method and pass View 13

ContextMenu From Tip Calculator Long press on total amount EditText Default behavior for EditText Nothing added in TipCalculator to create this 14

Contextual Action Mode 3.0 and later 15

STYLES 16

Styles Defined in XML file res/values/style similar to a cascading style sheet as used in html group layout attributes in a style and apply to various View objects (TextView, EditText, Button) 17

Sample Styles, in styles.xml 18

Apply Style - in main xml 19

Result of Styles can override elements of style – bottom edit text overrides color one style can inherit from another use UI editor to create view and then extract to style 20

GESTURES 21

Common Gestures 22

Common Gestures 23

Common Gestures Fling or flick gesture: similar to swipe or drag scroll/swipe/drag – user presses then moves finger in s steady motion before lifting finger fling or flick – user presses then moves finger in an accelerating motion before lifting 24

Dealing With Gestures To handle simple touch events create View.OnTouchListener for view Example from tutorial, screen press leads to player moving if it is their turn and they touch an open square 25

onTouchEvent passed a MotionEvent object with a large amount of data in tic tac toe tutorial you only used location of event (x and y) 26

Handling Common Gestures Instead of trying to decode gestures from the MotionEvent passed to on touch … Use the GestureDetector class Add a GestureDetector object to View override View.onTouhcEvent method to pass MotionEvent on to the GestureDetector.onTouchEvent method 27

Handling Common Gestures create a GestureDetector.OnGestureListener (seveal gestures) or a GestureDetector.SimpleOnGestureListener ( more gestures) and register it with the GesturerDetector callback methods for onDoubleTap, onLongPress, onScroll, onFling, onSingleTapConfirmed, many more 28

Complex Gestures Non standard gestures required lots of code to recognize Android 1.6 introduced new APIs to store, load, draw, and recognize gestures Gesture Builder app on emulator – emulator must include virtual SD card – allows creating set of gestures for your ppliaction 29

Complex Gestures Each gesture associated with name multiple gestures can have same name – variations on same gesture, better chance of recognizing Move gestures from emulator to application res/raw folder 30

Complex Gestures Recognizing gestures via a GestureOverlayView simple drawing board on top of view that shows and records user gestures When gesture complete GestureLibrary queried to see if gesture is recognized Predictions between entered gesture and those in the library 31

Animal Sounds App 32

Predictions 33

onCreate 34

Listener 35