1 / 8

Android Introduction

Android Introduction. Graphical User Interface. Goal. Familiarize with the main types of GUI components Concepts: Layouts Widgets Menus. View Hierarchy. All the views in a window are arranged in a tree You show the tree by calling setContentView(rootNode) in the activity. Layout.

tim
Download Presentation

Android Introduction

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Android Introduction Graphical User Interface

  2. Goal • Familiarize with the main types of GUI components • Concepts: • Layouts • Widgets • Menus

  3. View Hierarchy • All the views in a window are arranged in a tree • You show the tree by calling setContentView(rootNode) in the activity

  4. Layout • Defines how elements are positioned relative to each other (next to each other, under each other, in a table, grid, etc.) • Can have a different layouts for each ViewGroup

  5. Widgets • All are View objects • Examples: • TextFields • EditFields • Buttons • Checkboxes • RadioButtons • etc.

  6. UI Events • Usually handled by defining a Listener of the form On<something>Listener and register it with the View • For example: • OnClickListener() for handling clicks on Buttons or Lists • OnTouchListener() for handling touches • OnKeyListerner() for handling key presses • Alternatively, Override an existing callback if we implemented our own class extending View

  7. Menus • Context Menu • Sub-menu • Options Menu

  8. Menus (continued) MenuItem MenuItem Has 0 or more Has 0 or more Has 0 or more SubMenu

More Related