UI Design and Development +Roman Nurik +Nick Butcher.

Slides:



Advertisements
Similar presentations
Android User Interface
Advertisements

App Customization. Introduction  Not all Android apps look the same  i.e. the default bland black and white look  Most have custom looks like  Background.
 User Interface - Raeha Sandalwala.  Introduction to UI  Layouts  UI Controls  Menus and ‘Toasts’  Notifications  Other interesting UIs ◦ ListView.
Filip Debelić What is it? Android is a mobile operating system (OS) based on the Linux kernel and currently developed by Google Android,
User Interface Android Applications. Activities An activity presents a visual user interface. Each activity is given a default window to draw in. The.
By: Jeremy Smith.  Introduction  Droid Draw  Add XML file  Layouts  LinearLayout  RelativeLayout  Objects  Notifications  Toast  Status Bar.
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
CS378 - Mobile Computing User Interface Basics MIKE!! LOOK HERE FOR intercepting the ListView items:
Android: Layouts David Meredith
Custom Views, Drawing, Styles, Themes, ViewProperties, Animations, oh my!
Creating Android user interfaces using layouts 1Android user interfaces using layouts.
Mobile Programming Lecture 1 Getting Started. Today's Agenda About the Eclipse IDE Hello, World! Project Android Project Structure Intro to Activities,
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 9: Customize! Navigating with a Master/Detail.
Android: versions Note that: Honeycomb (Android v3.0) A tablet-only release Jelly Bean (Android v4.1) Released on July 09, 2012.
CS5103 Software Engineering Lecture 08 Android Development II.
Chapter 2: Simplify! The Android User Interface
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.
Android Layouts. Layouts Define the user interface for an activity Layouts are defined in.xml files – within /res/layout folder – different layout can.
ANDROID – INTERFACE AND LAYOUT L. Grewe. Interfaces: Two Alternatives Code or XML  You have two ways you can create the interface(s) of your Application.
Basic Android Tutorial USF’s Association for Computing Machinery.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Using Android XML Resources.
Android for Java Developers Denver Java Users Group Jan 11, Mike
Chapter 2 The Android User Interface. Objectives  In this chapter, you learn to:  Develop a user interface using the TextView, ImageView, and Button.
Android Boot Camp for Developers Using Java, 3E
Resources. Application Resources Resources are strings, images, and other pieces of application information that are stored and maintained (externalized)
User Interfaces: Part 1 (View Groups and Layouts).
Application Development for mobile Devices
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 2: Simplify! The Android User Interface.
UI Design and Development +Roman Nurik +Nick Butcher.
ANDROID – DRAWING IMAGES – SIMPLE EXAMPLE IN INTERFACE AND EVENT HANDLING L. Grewe.
MOBILE COMPUTING D10K-7D02 MC04: Layouts Dr. Setiawan Hadi, M.Sc.CS. Program Studi S-1 Teknik Informatika FMIPA Universitas Padjadjaran.
Program Studi S-1 Teknik Informatika FMIPA Universitas Padjadjaran
ANDROID AND MODEL / VIEW / CONTROLLER. Slide 2 Design Patters Common solutions to programming problems are called design patterns Design patterns are.
Copyright© Jeffrey Jongko, Ateneo de Manila University Deconstructing HelloWorld.
© 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.
Pearson Webcast Series
CS378 - Mobile Computing More UI - Part 2. Special Menus Two special application menus – options menu – context menu Options menu replaced by action bar.
CS378 - Mobile Computing User Interface Basics. User Interface Elements View – Control – ViewGroup Layout Widget (Compound Control) Many pre built Views.
Building User Interfaces Basic Applications
© 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.
BUILDING A SIMPLE USER INTERFACE. In this lesson, you create a layout in XML that includes a text field and a button. In the next lesson, your app responds.
Resources & Android Manifest Калин Кадиев Astea Solutions AD.
CHAPTER 4 Fragments ActionBar Menus. Explore how to build applications that use an ActionBar and Fragments Understand the Fragment lifecycle Learn to.
CS371m - Mobile Computing User Interface Basics. UI Programming with Widgets Widget is an element in a Graphical User Interface (GUI) – not to be confused.
ANDROID LAYOUTS AND WIDGETS. Slide 2 Introduction Parts of the Android screen Sizing widgets and fonts Layouts and their characteristics Buttons, checkboxes.
INTRODUCTION TO ANDROID. Slide 2 Introduction I take a top-down approach to describing an application’s anatomy.
Building UI Components Димитър Н. Димитров Astea Solutions AD.
UI Redux, Navigation Patterns, Tabbed Views, Pagers, Drawers
CHAPTER 1 part 1 Introduction. Chapter objectives: Understand Android Learn the differences between Java and Android Java Examine the Android project.
Chapter 2: Simplify! The Android User Interface
Open Handset Alliance.
Mobile Software Development for Android - I397
Mobile Application Development Chapter 3 [Using Eclipse Android Studio for Android Development] IT448-Fall 2017 IT448- Fall2017.
MAD.
Android Widget Tutorial
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 # 13
HNDIT2417 Mobile Application Development
Android SDK & App Development
CIS 470 Mobile App Development
Android Layout Basics Topics
CA16R405 - Mobile Application Development (Theory)
Building User Interfaces Basic Applications
Android Developer Fundamentals V2
CIS 470 Mobile App Development
Objects First with Java
Introduction to Android
Android Sensor Programming
Presentation transcript:

UI Design and Development +Roman Nurik +Nick Butcher

2 1.Designing for Android 2.Layouts and resources 3.Tablet considerations 4.System UI integration 5.Wireframing Agenda

Designing for Android

4 d.android.com/design

5  Touch –Interact primarily with your fingers –Expect direct manipulation  Mobile –Often on the go –Often without network connectivity  Heterogeneity –Different screen sizes and densities –Different hardware features –Different OS versions Design for…

6 “Pictures are faster than words.” “Only show what I need when I need it.” “Make the important things fast.” “Do the heavy lifting for me.” Key principles

7 “Holo” visual language

8 Holo variations DarkDark Action BarLight

9 Activity UI structure Action bar Tabs Content (activity layout)

10 Activity UI structure Action bar

11 Action bar 1.App icon and optional Up caret 2.View control (Title/tabs/dropdown) 3.Action buttons 4.Action overflow

12 Action bar  Automatically added to modern apps  Customizable –getActionBar().setDisplayOptions() –getActionBar().setNavigationMode()  Themeable

13 Activity UI structure Action bar

14 Activity UI structure Tabs

15 Tabs

16 Tabs  Part of the ActionBar APIs  Usually gesture-enabled using ViewPager getActionBar().setNavigationMode(NAVIGATION_MODE_TA BS); ActionBar.Tab tab = actionBar.newTab(); tab.setText(“Tab 1”); tab.setTabListener(this); getActionBar().addTab(tab);

17 EXERCISE Create an app with an action bar + tabs

18 Activity UI structure Tabs

19 Activity UI structure Content (activity layout)

Layouts and resources

21 Layout system  The UI for an activity is a tree consisting of view groups and views (leaf nodes), like HTML.  Most commonly defined in XML under res/layout/.

22 Views and View Groups Views  Reusable individual UI components  Optionally interactive (clickable/focusable/etc.)  Bare minimum functionality is to draw themselves View Groups  Ordered list of Views and View Groups  In charge of positioning and sizing their child views and layouts  Simple layouts and more complex groups (e.g. ListView)

23 Views and View Groups Views  TextView  EditText  Spinner  Button  ImageView  ImageButton  WebView  SurfaceView  Your own custom views Layouts (simple View Groups)  FrameLayout  LinearLayout  RelativeLayout  GridLayout  Your own custom layouts Complex View Groups  ScrollView  ListView

24 Anatomy of a simple layout

25

26 <ScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:padding="16dp"> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:inputType="text Address" android:singleLine="true" /> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:inputType="textPassword” android:singleLine="true" /> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="right" android:layout_marginTop="16dp" android:paddingLeft="32dp" android:paddingRight="32dp" />

27 Important layout attributes android:layout_weight –Children of LinearLayout android:layout_gravity –Children of FrameLayout, LinearLayout android:gravity –TextView, LinearLayout

28 Margins and padding Sign in or register android:layout_margin android:padding

29 EXERCISE Code this layout

30 Button

31 Button <LinearLayout orientation=“horizontal” layout_weight=“1”>

32 Fixed header List view Fixed footer

33 Fixed header List view Fixed footer layout_height=“wrap_conten t”

34 App resources  One universal app binary contains all resources  System chooses at runtime which resources to use res/ drawable drawable-xhdpi drawable-hdpi drawable-mdpi layout layout-land layout-large layout-large-land

35 PNGs, 9-patch PNGs, optimized for multiple densities Layout XML optimized for physical screen size and orientation Strings XML localized for your target regions Drawable XML Strings, styles, themes, etc. Styles, themes varying by API level res/ drawable drawable-xhdpi drawable-hdpi drawable-mdpi layout layout-land layout-large layout-large-land values values-v11 values-v14 values-en values-fr values-ja

36 Referencing resources  A string in res/values/strings.xml –In Java: R.string.hello –In  The system “edit” icon: –In Java: android.R.drawable.ic_menu_edit –In

37 Referencing resources Namespace (either android or blank) Resource type Resource name

38 DIP units keep things the same physical size across any screen. 1 dip = 1 MDPI (160 dpi) 1 dip = 2 XHDPI (320 dpi) Screen density and DIP units

39 Q: What is the Nexus 7’s screen resolution in DIPs if it’s 1280x800 px and 213dpi? A: ~960x600 dip

40 Screen density and DIP units Icons and other PNG files should generally be provided for multiple densities

41  Bitmaps (.png)  9-patches (.9.png)  State Lists (.xml) Key drawable types

42  Border pixels indicate stretchable regions  Make density-specific versions (-xhdpi) 9-patches – foo.9.png

43 State list drawables <item android:state_enabled="false"... /> <item android:state_pressed="true"... /> <item android:state_focused="true"... /> drawable/ foo.xml

44 State list drawables drawable- mdpi/ foo_default.pngfoo_disabled.pngfoo_focused.pngfoo_pressed.png drawable- hdpi/ foo_default.pngfoo_disabled.pngfoo_focused.pngfoo_pressed.png

45 Collections of layout XML attribute values, kind of like CSS Instead of this… Styles <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="4dp" android:text="1" /> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="4dp" android:text="2" />

46 …use this! Styles <TextView android:text="1" /> <TextView android:text="2" /> 4dp match_parent wrap_content res/values/ styles.xml

47 Are styles that apply to whole activities (or the entire app) Themes AndroidManifest.xml...

@android:style/Theme.Holo.Light

49 Themes Like styles, themes are extensible...

50 EXERCISE Change your app’s theme to Holo Light

Tablet considerations

52 Information hierarchy and flow Traditional desktop app or website

53 Information hierarchy and flow Tablet or mini desktop app

54 Information hierarchy and flow Mobile phone app

55  Separate activities into UI or code modules, each have their own class  Help with supporting phones + tablets –Each content pane is a fragment –Fragments split across activities  in layout XML –Automatically instantiates the given fragment –Acts as a placeholder for the fragment’s view to be inserted in that part of the layout tree Fragments

56  Customize layouts for large screens –Includes tags  Incrementally increase font sizes, spacing, tweak styles Tablet resources res/ layout-large/ values-large/ dimens.xml styles.xml

System UI integration

58 System UI integration App WidgetsAccounts + Sync Notifications

59 Collapsed Expanded Android 4.1+ Iconified Notifications

60 Notifications Interactive

61  Created with NotificationManager and Notification.Builder()  Custom layouts with RemoteViews –Your layouts, used in a different process  Interaction is handled entirely using intents Notifications

62 Scrollable Interactiv e Resizable App widgets

63  Defined in your manifest as a receiver –Handles the APPWIDGET_UPDATE intent action –Metadata provided in res/xml/widgetinfo.xml and referenced in manifest  Layout using RemoteViews –Your layouts, used in a different process  Interaction is handled entirely using intents App widgets

64 EXERCISE Show a notification in your project Hint: use NotificationManager

Wireframing

66  Record your ideas and asses their real-world feasibility  Test your your ideas and rapidly iterate –See which work and which don’t, evolve them  Map out user flow and activity diagrams –Re-arrange/add/remove interactions quickly –Scope UI complexity –Plan out intra-app “Intent-based API” Why create wireframes?

67 Wireframing before coding saves you time.

68 Wireframing tools Fidelity Time/Effort Pen + Paper Photoshop Fireworks Eclipse Layout Editor Balsamiq Pencil (Firefox addon) Keynote/Po werpoint OmniGraffle (Mac) Fluid UI Wireframe Sketcher

69 Wireframing tools Fidelity Time/Effort Pen + Paper Photoshop Fireworks Eclipse Layout Editor Balsamiq Pencil (Firefox addon) Keynote/Po werpoint OmniGraffle (Mac) Fluid UI Wireframe Sketcher Interactive wireframes

70 Wireframing tools Fidelity Time/Effort Pen + Paper Photoshop Fireworks Eclipse Layout Editor BalsamiqPencil (Firefox addon) Keynote/Po werpoint OmniGraffle (Mac) Fluid UI Wireframe Sketcher Recommende d tools

71 Always start with pencil and paper. (or a whiteboard)

72

73 EXERCISE Sketch a todo list app