designing uis for phones and tablets - android developr lab q3 2011

59
Q3 2011

Upload: paris-android-user-group

Post on 18-Nov-2014

1.822 views

Category:

Technology


0 download

DESCRIPTION

http://paug.fr

TRANSCRIPT

Page 1: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

Page 2: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

Designing UIs for Phones and Tablets Q3 2011

Page 3: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

3

1. Honeycomb visual design

2. Tablet UI patterns + Honeycomb framework features –  Interaction design –  Implementation

3. Do’s and don’ts

4. Example — Google I/O 2011 App

Agenda

Page 4: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

Honeycomb visual design

Page 5: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

5

Introducing the Holographic UI

Page 6: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

6

Early style explorations

Page 7: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

7

Widget styling – Theme.Holo.Light

Page 8: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

8

Simplify UI – Removing boxes

Page 9: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

Honeycomb UI patterns and framework features

Page 10: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

10

§  General solutions to recurring problems

§  Framework-supported

§  Guidelines, not restrictions

§  Topics we’ll discuss today: 1.  Action Bar 2.  Multi-pane Layouts 3.  App Navigation 4.  Beyond the List

UI patterns

Page 11: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

11

Action Bar

Page 12: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

12

§  Not a new pattern – Presented as phone UI pattern at Google I/O 2010 – Used in many apps through Android Market – Honeycomb has greatly extended its usefulness

§  Dedicated real estate at the top of each screen – Generally persistent throughout application

Action Bar – Introduction

Page 13: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

13

§  Used to make frequently used actions prominent

§  Supports navigation, give users a sense of place

§  Convenient means of handling Menu and Search

Action Bar – Introduction

Page 14: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

14

Action Bar – General organization

§  App icon — where am I?

§  View details — what can I see?

§  Action buttons — what can I do here?

Page 15: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

15

§  App icon – Can be replaced with logo or other branding – Give the user a sense of place – Used to support “upward” navigation within the

app

Action Bar – General organization

Page 16: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

16

§  View details – Simple: non-interactive title bar replacement – Richer: Tabs, drop-down menus, breadcrumbs

Action Bar – General organization

Page 17: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

17

§  Action buttons – More important / frequently-accessed action at left – Buttons can be icon-only, text-only, or icon-and-text – Overflow menu

Action Bar – General organization

17

Page 18: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

18

§  Action bar can transform its appearance when items are selected – Useful for single or multiple selection –  Typically invoking via touch and hold

§  Like normal action bar, three sections: – Done button (for releasing selection) – Selection details – Contextual action buttons

§  Implemented using ActionMode!

Action Bar – Contextual actions

Page 19: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

19

§  Basic action bar –  Theme.Holo (default if targetSdkVersion ≥ 11) – Action items from res/menu/ with showAsAction!

§  Customizing the action bar –  ActionBar class

Action Bar – Implementation

j.mp/customizing-action-bar

Page 20: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

20

1.  Write a custom action bar implementation pre-Honeycomb –  iosched –  GreenDroid –  ActionBarSherlock

2.  Alternatively, defer to the standard Options menu

Action Bar – Compatibility

Page 21: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

21

Action Bar – Phones and tablets

Page 22: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

22

§  Take advantage of vastly increased real estate – Avoids excessively long line lengths

§  Consolidate multiple related phone screens into a single compound view

§  Provide more context (e.g. Settings)

Multi-pane Layouts – Introduction

Page 23: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

23

§  Panes to the right should generally present more content or details for items selected in the panes on the left.

Multi-pane Layouts – Tips

Page 24: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

24

§  Fragment class

§  Optionally use the <fragment> tag in layout XML

§  But fragments are a lifecycle construct, not necessarily a visual construct

Multi-pane Layouts – Implementation

Page 25: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

25

Stretch(e.g. Settings)

Show/hide(e.g. Gmail)

Expand/collapse(e.g. Google Talk)

Stack(e.g. Calendar)

Multi-pane Layouts – Orientation change

Page 26: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

26

§  Orientation changes should preserve functional parity – User shouldn’t have to rotate device to achieve a

task

§  Strategies apply per-screen, not per app

§  For the show/hide orientation strategy, use UP navigation to show the master pane –  e.g. Gmail conversation view

Multi-pane Layouts – Orientation change

Page 27: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

27

Multi-pane Layouts – Intents

Page 28: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

28

Multi-pane Layouts – Intents

Page 29: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

29

Multi-pane Layouts – Intents

§  If implementing A à B with multiple activities, need a strategy to “connect” fragments

– Activity 1 (Phone, A) – Activity 2 (Phone, B) – Activity 3 (Tablet, A & B)

Page 30: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

30

Strategies for “connecting” fragments

1.  Phone + tablet activities implement a common interface

2.  Fragments hold references to each other, or use setTargetFragment!–  Defer to startActivity if no target fragment!

…!

Page 31: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

31

Strategies for “connecting” fragments

3.  Fragments call startActivity, tablet activity intercepts/overrides it!

4.  Fragments call startActivity, tablet activity is singleTask (or singleTop) + routes intent to correct fragment in onNewIntent.!

Page 32: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

32

§  One of the more dramatic changes in Honeycomb

§  Increased variety of mechanisms for direct, deep navigation into an app

App Navigation – Introduction

Page 33: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

33

App Navigation – Highlights

Richer notifications

Richer home screen widgets

‘Recents’

Page 34: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

34

§  Android has traditionally relied on temporal memory: – We’re good at remembering what just happened – Not so good with order of events from a while ago – Potential for error, surprise

§  Users have strong structural memory – Good at relationships between screens in an app – Used to going “Home” in web apps – Clearer expectations for behavior

Navigation and user memory

Page 35: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

35

§  APPLICATION UP navigates hierarchy within a single app

§  SYSTEM BACK navigates history between related screens

Back versus Up

Page 36: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

36

Example Flows

Contacts Task

Contacts

Page 37: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

37

Example Flows

Contacts Task

Contacts Contactdetails

Page 38: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

38

Example Flows

Page 39: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

39

Example Flows

Page 40: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

40

Example Flows

Contacts Task

Contacts

Page 41: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

41

Example Flows

Contacts Task

Contacts Contactdetails

Page 42: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

42

Example Flows

Contacts Task

Contacts Contactdetails

Composeemail

Page 43: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

43

Example Flows

Page 44: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

44

Example Flows

Page 45: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

45

§  Views for media-rich applications

§  “Hero moments” to break the monotony of list views

§  Encourage more engaged exploration, akin to flipping through a magazine

Beyond the List – Introduction

Page 46: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

46

Beyond the List – Examples

Page 47: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

47

§  CarouselView (3D) – Renderscript –  Intended for customization

§  ViewPager (2D) for showing one item or page at a time

Beyond the List – Implementation

j.mp/io2011-carousel-sample

Page 48: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

Do’s and don’ts

Page 49: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

49

§  DO aim for a single APK

§  DO use the compatibility library

§  DO customize visual design completely, if straying from Holo theme

§  DO support both landscape and portrait

§  DO extract dimensions for phones and tablets –  values/ dimens.xml!

–  values-large/ dimens.xml!

§  DO use theme/style/etc. to reduce redundancy

Page 50: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

50

§  drawable-hdpi!

§  drawable-large-mdpi-v11!

DO marry OS visual style with your brand/identity

Page 51: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

51

§  DON’T assume API level ≥11 == tablet

§  DON’T assume xlarge == tablet –  7" tablet is large

§  DON’T use small font sizes

§  DON’T overuse fill_parent; avoid excessively long lines of text

Page 52: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

52

DON’T think that tablets are just big phones

Tablets fulfill a very different need.

Page 53: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

Example: Google I/O 2011 App

Page 54: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

54

The image cannot be displayed. Your computer may not have enough memory to open the image, or the image may have been corrupted. Restart your computer, and then open the file again. If the red x still appears, you may have to delete the image and then insert it again.

Page 55: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

55

Page 56: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

56

Page 57: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

57

Get the code at

code.google.com/p/iosched

Page 58: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

For more, visit developer.android.com

Page 59: Designing UIs for phones and tablets - Android Developr Lab Q3 2011

Q3 2011

59

§  Android, Google are registered trademarks of Google Inc.

§  All other trademarks and copyrights are the property of their respective owners.

Copyrights and trademarks