by jeremy smith n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Android GUI PowerPoint Presentation
Download Presentation
Android GUI

Loading in 2 Seconds...

play fullscreen
1 / 15

Android GUI - PowerPoint PPT Presentation


  • 131 Views
  • Uploaded on

By: Jeremy Smith. Android GUI. Table of Contents. Introduction Droid Draw Add XML file Layouts LinearLayout RelativeLayout Objects Notifications Toast Status Bar Dialog Menus Events Listeners Handlers Focus Source. Introduction.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Android GUI' - chaka


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
table of contents
Table of Contents
  • Introduction
  • Droid Draw
  • Add XML file
  • Layouts
    • LinearLayout
    • RelativeLayout
  • Objects
  • Notifications
    • Toast
    • Status Bar
    • Dialog
  • Menus
  • Events
    • Listeners
    • Handlers
    • Focus
  • Source
introduction
Introduction
  • In Android, the UI is built using View and ViewGroup objects.
  • Views are a base for subclasses called “Widgets,” which offer fully implemented UI objects. (Ex. Text fields and buttons)
  • ViewGroups are a base for “layouts,” which offer different kinds of layout architectures.
  • Android GUI’s are coded in a version of XML and are based on the Views and ViewGroups.
adding xml files
Adding XML Files
  • Add an Android specific XML file to a project.
  • In your android project open up the res folder.
  • Then open the layout folder and you will see a generic file called main.xml
  • To add a XML file simply right click and add a new file. Under Android select the Android XML file and you have a brand new XML file open to edit in your project.
layouts
Layouts
  • Writing XML ( Android has its own XML vocabulary )
    • Used for designing UI layouts and screen elements
  • Each layout must have only one root element. (parent)
    • After you create an initial layout you can add additional layouts and widgets to the layout. (child objects)
  • Position, Size, Padding and Margins

Ex. getLeft(), getHight(), getPadding()

common layouts
Common Layouts

LinearLayout

RelativeLayout

widgets
Widgets
  • The visual UI elements to be used on your Application screen.
  • Includes Buttons, Images, dialog and many other objects.
  • Interfaces & Classes
how to create a button
How To Create a Button
  • In the java source code
  • In the XML layout
notifications
Notifications
  • For a situation where you may need to notify a user about an event from your application
  • 3 Types
    • Toast Notification
      • Brief message that comes form the background
    • Status Bar Notification
      • Background reminders that request the user’s response
    • Dialog Notification
      • Activity-related notifications, sometimes require an user interaction.

Toast Notification

Status Bar Notification

  • Dialog Notification
toast notification
Toast Notification
  • Initiating a Toast object
    • Initiate toast from the source code
    • Or by chaining methods
status bar notifications
Status Bar Notifications
  • How to create a status bar notification:
    • Reference the NotificationManager:
    • Instantiate the Notification:
    • Define the Notification's expanded message and Intent:

4. Pass the Notification to the NotificationManager:

dialog notifications
Dialog Notifications
  • Types of Dialogs
    • AlertDialog
      • Can have buttons, selectable items, and text dialog.
    • ProgressDialog
      • Displays a wheel or progress bar, also supports buttons.
    • DatePickerDialog
      • Allows user to select a date.
    • TimePickerDialog
      • Allows user to select a time.
    • CustomDialogs
      • Create your own dialog to suit your needs.
  • Examples
creating menus
Creating Menus
  • Allows users to access application functions and settings.
  • 3 Types of menus
    • Options Menu
      • Appear when user presses the hard MENU button
      • Two Types
        • Icon Menu
        • Expanded Menu
    • Context Menu
      • Floating list of menu items, appears after a long-press on an item.
    • Submenu
      • Floating list of menu items that the user opens by pressing a menu item in the Options Menu or context menu.
    • Example Menus
source
Source
  • http://developer.android.com/guide/topics/ui/index.html