Android Design Guidelines 4.0


Published on

This is a compilation of the Android Design Guidelines released by Google in early 2012. It' explains the philosophy and creative vision behind Android, and it also discusses the best practices for making a mobile and tablet app on Android.

Highly recommended for anyone who wants to start developing apps!

For more information on how to build Android apps, check out my blog at

Published in: Design, Technology, Spiritual
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Android Design Guidelines 4.0

  1. 1. AndroidDesign
  2. 2. Table of ContentsI. Getting Started 1) Creative Vision 2) Design Principles 3) UI OverviewII. Style 1) Devices and Displays 2) Themes 3) Touch Feedback 4) Metrics and Grids 5) Typography 6) Color 7) Iconography 8) Writing StyleIII. Patterns 1) New in Android 4.0 2) Gestures 3) App Structure 4) Navigation 5) Action Bar 6) Multi-pane Layouts 7) Swipe Views 8) Selection 9) Notifications 10) Settings 11) Compatibility 12) Pure AndroidIV. Building Blocks 1) Tabs 2) Lists 3) Grid Lists 4) Scrolling 5) Spinners 6) Buttons 7) Text Fields 8) Seek Bars 9) Progress & Activity 10) Switches 11) Dialog 12) Pickers
  3. 3. I. Getting Started1) Creative VisionIce Cream Sandwich (Android 4.0) marks a major milestone for Android design. We touched nearlyevery pixel of the system as we expanded the new design approaches introduced in Honeycombtablets to all types of mobile devices. Starting with the most basic elements, we introduced a newfont, Roboto, designed for high-resolution displays. Other big changes include framework-levelaction bars on phones and support for new phones without physical buttons.We focused the design work with three overarching goals for our core apps and the system at large.As you design apps to work with Android, consider these goals:Enchant meBeauty is more than skin deep. Android apps are sleek and aesthetically pleasing on multiple levels.Transitions are fast and clear; layout and typography are crisp and meaningful. App icons areworks of art in their own right. Just like a well-made tool, your app should strive to combine beauty,simplicity and purpose to create a magical experience that is effortless and powerful.Simplify my lifeAndroid apps make life easier and are easy to understand. When people use your app for the firsttime, they should intuitively grasp the most important features. The design work doesnt stop at the
  4. 4. first use, though. Android apps remove ongoing chores like file management and syncing. Simpletasks never require complex procedures, and complex tasks are tailored to the human hand andmind. People of all ages and cultures feel firmly in control, and are never overwhelmed by too manychoices or irrelevant flash.Make me amazingIts not enough to make an app that is easy to use. Android apps empower people to try new thingsand to use apps in inventive new ways. Android lets people combine applications into newworkflows through multitasking, notifications, and sharing across apps. At the same time, your appshould feel personal, giving people access to superb technology with clarity and grace.2) Design PrinciplesThese design principles were developed by and for the Android User Experience Team to keepusers best interests in mind. Consider them as you apply your own creativity and design thinking.Deviate with purpose.Enchant MeDelight me in surprising waysA beautiful surface, a carefully-placed animation, or a well-timed sound effect is a joy toexperience. Subtle effects contribute to a feeling of effortlessness and a sense that a powerfulforce is at hand.Real objects are more fun than buttons and menusAllow people to directly touch and manipulate objects in your app. It reduces the cognitive effortneeded to perform a task while making it more emotionally satisfying.
  5. 5. Let me make it minePeople love to add personal touches because it helps them feel at home and in control. Providesensible, beautiful defaults, but also consider fun, optional customizations that dont hinder primarytasks.Get to know meLearn peoples preferences over time. Rather than asking them to make the same choices over andover, place previous choices within easy reach.
  6. 6. Simplify My LifeKeep it briefUse short phrases with simple words. People are likely to skip sentences if theyre long.Pictures are faster than wordsConsider using pictures to explain ideas. They get peoples attention and can be much moreefficient than words.
  7. 7. Decide for me but let me have the final sayTake your best guess and act rather than asking first. Too many choices and decisions makepeople unhappy. Just in case you get it wrong, allow for undo.Only show what I need when I need itPeople get overwhelmed when they see too much at once. Break tasks and information into small,digestible chunks. Hide options that arent essential at the moment, and teach people as they go.
  8. 8. I should always know where I amGive people confidence that they know their way around. Make places in your app look distinct anduse transitions to show relationships among screens. Provide feedback on tasks in progress.Never lose my stuffSave what people took time to create and let them access it from anywhere. Remember settings,personal touches, and creations across phones, tablets, and computers. It makes upgrading theeasiest thing in the world.If it looks the same, it should act the sameHelp people discern functional differences by making them visually distinct rather than subtle.Avoid modes, which are places that look similar but act differently on the same input.
  9. 9. Only interrupt me if its importantLike a good personal assistant, shield people from unimportant minutiae. People want to stayfocused, and unless its critical and time-sensitive, an interruption can be taxing and frustrating.Make Me AmazingGive me tricks that work everywherePeople feel great when they figure things out for themselves. Make your app easier to learn byleveraging visual patterns and muscle memory from other Android apps. For example, the swipegesture may be a good navigational shortcut.
  10. 10. Its not my faultBe gentle in how you prompt people to make corrections. They want to feel smart when they useyour app. If something goes wrong, give clear recovery instructions but spare them the technicaldetails. If you can fix it behind the scenes, even better.Sprinkle encouragementBreak complex tasks into smaller steps that can be easily accomplished. Give feedback on actions,even if its just a subtle glow.Do the heavy lifting for meMake novices feel like experts by enabling them to do things they never thought they could. Forexample, shortcuts that combine multiple photo effects can make amateur photographs lookamazing in only a few steps.
  11. 11. Make important things fastNot all actions are equal. Decide whats most important in your app and make it easy to find andfast to use, like the shutter button in a camera, or the pause button in a music player.3) UI OverviewAndroids system UI provides the framework on top of which you build your app. Important aspectsinclude the Home screen experience, global device navigation, and notifications.Your app will play an important part in keeping the overall Android experience consistent andenjoyable to use. At the end of this chapter we introduce the main elements for achieving this goalin your app.Read on for a quick overview of the most important aspects of the Android user interface.Home, All Apps, and Recents
  12. 12. Home screenHome is a customizable space that houses app shortcuts, folders and widgets. Navigate betweendifferent home screen panels by swiping left and right.The Favorites Tray at the bottom always keeps your most important shortcuts and folders in viewregardless of which panel is currently showing.Access the entire collection of apps and widgets by touching the All Apps button at the center ofthe Favorites Tray.
  13. 13. All apps screenThe All Apps screen lets you browse the entire set of apps and widgets that are installed on yourdevice.Users can drag an app or widget icon from the All Apps screen and place it in any empty locationon any Home screen.
  14. 14. Recents screenRecents provides an efficient way of switching between recently used applications. It provides aclear navigation path between multiple ongoing tasks.The Recents button at the right side of the navigation bar displays the apps that the user hasinteracted with most recently. They are organized in reverse chronological order with the mostrecently used app at the bottom.Switch to an app by touching it. Remove an item by swiping left or right.
  15. 15. System BarsThe system bars are screen areas dedicated to the display of notifications, communication ofdevice status, and device navigation. Typically the system bars are displayed concurrently withyour app. Apps that display immersive content, such as movies or images, can temporarily hide thesystem bars to allow the user to enjoy full screen content without distraction.1. Status Bar Displays pending notifications on the left and status, such as time, battery level, or signal strength, on the right. Swipe down from the status bar to show notification details.2. Navigation Bar New for phones in Android 4.0, the navigation bar is present only on devices that dont have the traditional hardware keys. It houses the device navigation controls Back, Home, and Recents, and also displays a menu for apps written for Android 2.3 or earlier.3. Combined Bar
  16. 16. On tablet form factors the status and navigation bars are combined into a single bar at the bottom of the screen.NotificationsNotifications are brief messages that users can access at any time from the status bar. Theyprovide updates, reminders, or information thats important, but not critical enough to warrantinterrupting the user. Open the notifications drawer by swiping down on the status bar. Touching anotification opens the associated app. More on Notifications
  17. 17. Most notifications have a one-line title and a one-line message. The recommended layout for anotification includes two lines. If necessary, you can add a third line. Timestamps are optional.Swiping a notification right or left removes it from the notification drawer.Common App UIA typical Android app consists of action bars and the app content area.1. Main Action Bar The command and control center for your app. The main action bar includes elements for navigating your apps hierarchy and views, and also surfaces the most important actions. More on the Action Bar2. View Control Allows users to switch between the different views that your app provides. Views typically consist of different arrangements of your data or different functional aspects of your app.3. Content Area The space where the content of your app is displayed.4. Split Action Bar Split action bars provide a way to distribute actions across additional bars located below the main action bar or at the bottom of the screen. In this example, a split action bar moves important actions that wont fit in the main bar to the bottom.
  18. 18. II. Style1) Devices and DisplaysAndroid powers millions of phones, tablets, and other devices in a wide variety of screen sizes andform factors. By taking advantage of Androids flexible layout system, you can create apps thatgracefully scale from large tablets to smaller phones.Be flexibleStretch and compress your layouts to accommodate various heights and widths.Optimize layoutsOn larger devices, take advantage of extra screen real estate. Create compound views that combinemultiple views to reveal more content and ease navigation.
  19. 19. Assets for allProvide resources for different screen densities (DPI) to ensure that your app looks great on anydevice.StrategiesSo where do you begin when designing for multiple screens? One approach is to work in the basestandard (medium size,MDPI) and scale it up or down for the other buckets. Another approach is tostart with the device with the largest screen size, and then scale down and figure out the UIcompromises youll need to make on smaller screens.For more detailed information on this topic, please visit Supporting Multiple Screens.2) ThemesGmail in Holo Light.
  20. 20. Settings in Holo Dark.Talk in Holo Light with dark action bar.
  21. 21. 3) Touch FeedbackUse color and illumination to respond to touches, reinforce the resulting behaviors of gestures, andindicate what actions are enabled and disabled.Whenever a user touches an actionable area in your app, provide a visual response. This lets theuser know which object was touched and that your app is "listening".StatesMost of Androids UI elements have touch-feedback built in, including states that indicate whethertouching the element will have any effect.
  22. 22. CommunicationWhen your objects react to more complex gestures, help users understand what the outcome of theoperation will be. For example, in Recents, when you start swiping a thumbnail left or right, it startsto dim. This helps the user understand that swiping will cause the item to be removed.
  23. 23. BoundariesWhen users try to scroll past the upper or lower limit of a scrollable area, communicate theboundary with a visual cue. For example, if a user attempts to scroll past the first home screenpanel, the screen content tilts to the right to indicate that further navigation in this direction is notpossible. Many of Androids scrollable UI widgets (e.g. lists or grid lists) already have support forboundary feedback built in. If you are building custom, keep boundary feedback in mind andprovide it from within your app.4) Metrics and GridsDevices vary not only in physical size, but also in screen density (DPI). To simplify the way youdesign for multiple screens, think of each device as falling into a particular size bucket and densitybucket. The size buckets are handset(smaller than 600dp) and tablet (larger than or equal 600dp).The density buckets are LDPI, MDPI, HDPI, and XHDPI. Optimize your applications UI by designingalternative layouts for some of the different size buckets, and provide alternative bitmap images fordifferent density buckets.
  24. 24. Space considerationsDevices vary in the amount of density-independent pixels (dp) they can display.To see more, visit the Screen Sizes and Densities Device Dashboard.48dp RhythmTouchable UI components are generally laid out along 48dp units.Why 48dp?On average, 48dp translate to a physical size of about 9mm (with some variability). This iscomfortably in the range of recommended target sizes (7-10 mm) for touchscreen objects andusers will be able to reliably and accurately target them with their fingers.If you design your elements to be at least 48dp high and wide you can guarantee that: your targets will never be smaller than the minimum recommended target size of 7mm regardless of what screen they are displayed on. you strike a good compromise between overall information density on the one hand, and targetability of UI elements on the other.
  25. 25. Mind the gapsSpacing between each UI element is 8dp.Examples
  26. 26. 5) TypographyThe Android design language relies on traditional typographic tools such as scale, space, rhythm,and alignment with an underlying grid. Successful deployment of these tools is essential to helpusers quickly understand a screen of information. To support such use of typography, Ice CreamSandwich introduced a new type family named Roboto, created specifically for the requirements ofUI and high-resolution screens. The current TextView framework supports regular, bold, italic, andbold italic weights by default.
  27. 27. Download RobotoSpecimen BookDefault type colorsThe Android UI uses the following default color styles:textColorPrimary and textColorSecondary.For light themes use textColorPrimaryInverse andtextColorSecondaryInverse. The framework textcolor styles also support variants for touch feedback states when used inside UI elements.Typographic ScaleContrast in type sizes can go a long way to create ordered, understandable layouts. However, toomany different sizes in the same UI can be messy. The Android framework uses the followinglimited set of type sizes:
  28. 28. Users can select a system-wide scaling factor for text in the Settings app. In order to support these accessibility features, type should be specified in scale-independent pixels (sp) wherever possible. Layouts supporting scalable types should be tested against these settings. 6) Color Use color primarily for emphasis. Choose colors that fit with your brand and provide good contrast between visual components. Note that red and green may be indistinguishable to color-blind users. Palette Blue is the standard accent color in Androids color palette. Each color has a corresponding darker shade that can be used as a complement when needed. Download the swatches
  29. 29. 7) IconographyAn icon is a graphic that takes up a small portion of screen real estate and provides a quick,intuitive representation of an action, a status, or an app.LauncherThe launcher icon is the visual representation of your app on the Home or All Apps screen. Sincethe user can change the Home screens wallpaper, make sure that your launcher icon is clearlyvisible on any type of background.
  30. 30. Sizes & scale  Launcher icons on a mobile device must be 48x48 dp.  Launcher icons for display on Google Play must be512x512 pixels.Proportions  Full asset, 48x48 dpStyleUse a distinct silhouette. Three-dimensional, front view, with a slight perspective as if viewed fromabove, so that users perceive some depth.
  31. 31. Action BarAction bar icons are graphic buttons that represent the most important actions people can takewithin your app. Each one should employ a simple metaphor representing a single concept thatmost people can grasp at a glance.Pre-defined glyphs should be used for certain common actions such as "refresh" and "share." Thedownload link below provides a package with icons that are scaled for various screen densities andare suitable for use with the Holo Light and Holo Dark themes. The package also includes unstyled
  32. 32. icons that you can modify to match your theme, in addition to Adobe® Illustrator® source files forfurther customization.Download the Action Bar Icon PackSizes & scale  Action bar icons for phones should be 32x32 dp.Focal area & proportions
  33. 33.  Full asset, 32x32 dp Optical square, 24x24 dpStylePictographic, flat, not too detailed, with smooth curves or sharp shapes. If the graphic is thin, rotateit 45° left or right to fill the focal space. The thickness of the strokes and negative spaces should bea minimum of 2 dp.ColorsColors: #333333Enabled: 60% opacityDisabled: 30% opacityColors: #FFFFFFEnabled: 80% opacityDisabled: 30% opacitySmall / Contextual IconsWithin the body of your app, use small icons to surface actions and/or provide status for specificitems. For example, in the Gmail app, each message has a star icon that marks the message asimportant.
  34. 34. Sizes & scale  Small icons should be 16x16dp.Focal area & proportions  Full asset, 16x16 dp Optical square, 12x12 dpStyle
  35. 35. Neutral, flat, and simple. Filled shapes are easier to see than thin strokes. Use a single visualmetaphor so that a user can easily recognize and understand its purpose.ColorsUse non-neutral colors sparingly and with purpose. For example, Gmail uses yellow in the star iconto indicate a bookmarked message. If an icon is actionable, choose a color that contrasts well withthe background.Notification IconsIf your app generates notifications, provide an icon that the system can display in the status barwhenever a new notification is available.
  36. 36. Sizes & scale  Notification icons must be24x24 dp.Focal area & proportions  Full asset, 24x24 dp Optical square, 22x22 dpStyle
  37. 37. Keep the style flat and simple, using the same single, visual metaphor as your launcher icon.ColorsNotification icons must be entirely white. Also, the system may scale down and/or darken theicons.8) Writing StyleWhen choosing words for your app:1. Keep it brief. Be concise, simple and precise. Start with a 30 character limit (including spaces), and dont use more unless absolutely necessary.2. Keep it simple. Pretend youre speaking to someone whos smart and competent, but doesnt know technical jargon and may not speak English very well. Use short words, active verbs, and common nouns.
  38. 38. 3. Be friendly. Use contractions. Talk directly to the reader using second person ("you"). If your text doesnt read the way youd say it in casual conversation, its probably not the way you should write it. Dont be abrupt or annoying and make the user feel safe, happy and energized.4. Put the most important thing first. The first two words (around 11 characters, including spaces) should include at least a taste of the most important information in the string. If they dont, start over.5. Describe only whats necessary, and no more. Dont try to explain subtle differences. They will be lost on most users.6. Avoid repetition. If a significant term gets repeated within a screen or block of text, find a way to use it just once. Examples1. Keep it brief. From the setup wizard: Too formal Consult the documentation that came with your phone for further instructions. Better Read the instructions that came with your phone.1. Keep it simple. From the Location settings screen: Confusing Use GPS satellites When locating, accurate to street level. Better GPS
  39. 39. GPSLet apps use satellites to pinpoint your location.1. Be friendly. Dialog that appears when an application crashes:Confusing and annoying—"Sorry" just rubs salt in the wound.Sorry!Activity MyAppActivity (in application MyApp) isnot responding. Force close Wait ReportShorter, more direct, no faux-apologetic title:MyApp isnt responding.Do you want to close it? Wait Report Close1. Put the most important thing first.Top news last77 other people +1d this, including Larry Page.Top news firstLarry Page and 77 others +1d this.Task last
  40. 40. Touch Next to complete setup using a Wi-Ficonnection.Task firstTo finish setup using Wi-Fi, touch Next.1. Describe only whats necessary, and no more.From a Setup Wizard screenSigning in...Your phone needs to communicate withGoogle servers to sign in to your account.This may take up to five minutes.From a Setup Wizard screenSigning in...Your phone is contacting Google.This can take up to 5 minutes.
  41. 41. III. PatternsDesign apps that behave in a consistent, predictable fashion.New in Android 4.01) New in Android 4.0Navigation barAndroid 4.0 removes the need for traditional hardware keys on phones by replacing them with avirtual navigation bar that houses the Back, Home and Recents buttons. ReadtheCompatibility pattern to learn how the OS adapts to phones with hardware buttons and how pre-Android 3.0 apps that rely on menu keys are supported.
  42. 42. Action barThe action bar is the most important structural element of an Android app. It provides consistentnavigation across the platform and allows your app to surface actions.Multi-pane layoutsCreating apps that scale well across different form factors and screen sizes is important in theAndroid world. Multi-pane layouts allow you to combine different activities that show separately onsmaller devices into richer compound views for tablets.SelectionThe long press gesture which was traditionally used to show contextual actions for objects is nowused for data selection. When selecting data, contextual action bars allow you to surface actions.
  43. 43. 2) GesturesGestures allow users to interact with your app by manipulating the screen objects you provide. Thefollowing table shows the core gesture set that is supported in Android.TouchTriggers the default functionality for a given item.  Action Press, liftLong pressEnters data selection mode. Allows you to select one or more items in a view and act upon the datausing a contextual action bar. Avoid using long press for showing contextual menus.
  44. 44.  Action Press, wait, liftSwipeScrolls overflowing content, or navigates between views in the same hierarchy.  Action Press, move, liftDragRearranges data within a view, or moves data into a container (e.g. folders on Home Screen).  Action Long press, move, lift
  45. 45. Double touchZooms into content. Also used as a secondary gesture for text selection.  Action Two touches in quick successionPinch openZooms into content.  Action 2-finger press, move outwards, lift
  46. 46. Pinch closeZooms out of content.  Action 2-finger press, move inwards, lift3) Application StructureApps come in many varieties that address very different needs. For example: Apps such as Calculator or Camera that are built around a single focused activity handled from a single screen Apps such as Phone whose main purpose is to switch between different activities without deeper navigation Apps such as Gmail or the Play Store that combine a broad set of data views with deep navigationYour apps structure depends largely on the content and tasks you want to surface for your users.General StructureA typical Android app consists of top level and detail/edit views. If the navigation hierarchy is deepand complex, category views connect top level and detail views.
  47. 47. Top level viewsThe top level of the app typically consists of the different views that your app supports. The viewseither show different representations of the same data or expose an altogether different functionalfacet of your app.Category viewsCategory views allow you to drill deeper into your data.Detail/edit viewThe detail/edit view is where you consume or create data.Top Level
  48. 48. The layout of your start screen requires special attention. This is the first screen people see afterlaunching your app, so it should be an equally rewarding experience for new and frequent visitorsalike.Ask yourself: "What are my typical users most likely going to want to do in my app?", and structureyour start screen experience accordingly.Put content forwardMany apps focus on the content display. Avoid navigation-only screens and instead let people getto the meat of your app right away by making content the centerpiece of your start screen. Chooselayouts that are visually engaging and appropriate for the data type and screen size.The Play Store apps start screen primarily allows navigation into the stores for Apps, Music, Books,Movies and Games. It is also enriched with tailored recommendations and promotions that surfacecontent of interest to the user. Search is readily available from the action bar.Set up action bars for navigation and actionsAll screens in your app should display action bars to provide consistent navigation and surfaceimportant actions.At the top level, special considerations apply to the action bar: Use the action bar to display your apps icon or title. If your top level consists of multiple views, or if switching between data from different user accounts is a significant use case, make sure that its easy for the user to navigate between them by adding view controls to your action bar. If your app allows people to create content, consider making the content accessible right from the top level. If your content is searchable, include the Search action in the action bar so people can cut through the navigation hierarchy.
  49. 49. Email is about productivity, so an efficient, easy-to-skim list with higher data density works well.Navigation supports switching between accounts and recent labels. Icons for creating a newmessage or searching are prominent in the split action bar at the bottom.Create an identity for your appCreating an identity for your app goes beyond the action bar. Your app communicates its identitythrough its data, the way that data is arranged, and how people interact with it. Especially formedia-rich applications, try to create unique layouts that showcase your data and go beyond themonotony of simple list views.
  50. 50. The 3D carousel celebrates cover art and establishes a unique identity for the Music app.Defaulting to the Recent view keeps the focus on music the user has been listening to lately.CategoriesGenerally, the purpose of a deep, data-driven app is to navigate through organizational categoriesto the detail level, where data can be viewed and managed. Minimize perceived navigation effort bykeeping your apps shallow.Even though the number of vertical navigation steps from the top level down to the detail views istypically dictated by the structure of your apps content, there are several ways you can cut downon the perception of onerous navigation.Use tabs to combine category selection and data displayThis can be successful if the categories are familiar or the number of categories is small. It has theadvantage that a level of hierarchy is removed and data remains at the center of the usersattention. Navigating laterally between data-rich categories is more akin to a casual browsingexperience than to an explicit navigation step.If the categories are familiar, predictable, or closely related, use scrolling tabs (where not all itemsare in view simultaneously). Keep the number of scrolling tabs at a manageable level to minimizenavigational effort. Rule of thumb: no more than 5–7 tabs.
  51. 51. The Play Store app uses tabs to simultaneously show category choice and content. To navigatebetween categories, users can swipe left/right on the content.If the categories in the tabs are not closely related, favor fixed tabs, so that all categories are inview at the same time.
  52. 52. YouTube uses fixed tabs to switch between different, relatively unrelated functional areas.Allow cutting through hierarchiesTake advantage of shortcuts that allow people to reach their goals quicker. To allow top-levelinvocation of actions for a data item from within list or grid views, display prominent actionsdirectly on list view items using drop-downs or split list items. This lets people invoke actions ondata without having to navigate all the way down the hierarchy.
  53. 53. Music allows the user to act upon a data item (song) from within the category view (album),thereby removing the need to navigate all the way down to the songs detail view.Acting upon multiple data itemsEven though category views mostly serve to guide people to content detail, keep in mind that thereare often good reasons to act on collections of data as well.For example, if you allow people to delete an item in a detail view, you should also allow them todelete multiple items in the category view. Analyze which detail view actions are applicable tocollections of items. Then use multi-select to allow application of those actions to multiple items ina category view.DetailsThe detail view allows you to view and act on your data. The layout of the detail view depends onthe data type being displayed, and therefore differs widely among apps.Layout
  54. 54. Consider the activities people will perform in the detail view and arrange the layout accordingly. Forimmersive content, make use of the lights-out mode to allow for distraction-free viewing of full-screen content.
  55. 55. Google Books detail view is all about replicating the experience of reading an actual book. Thepage-flip animation reinforces that notion. To create an immersive experience the app enterslights-out mode, which hides all system UI affordances.The purpose of the People apps detail view is to surface communication options. The list viewallows for efficient scanning and quick access of phone numbers, email addresses and otherinformation items. Split items are used to combine calling and messaging into one compact lineitem.Make navigation between detail views efficientIf your users are likely to want to look at multiple items in sequence, allow them to navigatebetween items from within the detail view. Use swipe views or other techniques, such as filmstrips,to achieve this.Gmail using swipe views to navigate from detail view to detail view.
  56. 56. In addition to supporting swipe gestures to move left or right through images, Gallery provides afilmstrip control that lets people quickly jump to specific images.Checklist Find ways to display useful content on your start screen. Use action bars to provide consistent navigation. Keep your hierarchies shallow by using horizontal navigation and shortcuts. Use multi-select to allow the user to act on collections of data. Allow for quick navigation between detail items with swipe views.4) Navigation with Back and UpConsistent navigation is an essential component of the overall user experience. Few thingsfrustrate users more than basic navigation that behaves in inconsistent and unexpected ways.Android 3.0 introduced significant changes to the global navigation behavior. Thoughtfullyfollowing the guidelines for Back and Up will make your apps navigation predictable and reliablefor your users.
  57. 57. Android 2.3 and earlier relied upon the system Back button for supporting navigation within an app.With the introduction of action bars in Android 3.0, a second navigation mechanism appeared:the Up button, consisting of the app icon and a left-point caret.Up vs. BackThe Up button is used to navigate within an app based on the hierarchical relationships betweenscreens. For instance, if screen A displays a list of items, and selecting an item leads to screen B(which presents that item in more detail), then screen B should offer an Up button that returns toscreen A.If a screen is the topmost one in an app (that is, the apps home), it should not present an Upbutton.The system Back button is used to navigate, in reverse chronological order, through the history ofscreens the user has recently worked with. It is generally based on the temporal relationshipsbetween screens, rather than the apps hierarchy.When the previously viewed screen is also the hierarchical parent of the current screen, pressingthe Back button has the same result as pressing an Up button—this is a common occurrence.However, unlike the Up button, which ensures the user remains within your app, the Back buttoncan return the user to the Home screen, or even to a different app.
  58. 58. The Back button also supports a few behaviors not directly tied to screen-to-screen navigation: Dismisses floating windows (dialogs, popups) Dismisses contextual action bars, and removes the highlight from the selected items Hides the onscreen keyboard (IME)Navigation Within Your AppNavigating to screens with multiple entry pointsSometimes a screen doesnt have a strict position within the apps hierarchy, and can be reachedfrom multiple entry points—such as a settings screen that can be reached from any other screen inyour app. In this case, the Up button should choose to return to the referring screen, behavingidentically to Back.Changing view within a screenChanging view options for a screen does not change the behavior of Up or Back: the screen is stillin the same place within the apps hierarchy, and no new navigation history is created.Examples of such view changes are: Switching views using tabs and/or left-and-right swipes Switching views using a dropdown (aka collapsed tabs) Filtering a list Sorting a list Changing display characteristics (such as zooming)Navigating between sibling screensWhen your app supports navigation from a list of items to a detail view of one of those items, itsoften desirable to support direction navigation from that item to another one which precedes orfollows it in the list. For example, in Gmail, its easy to swipe left or right from a conversation toview a newer or older one in the same Inbox. Just as when changing view within a screen, suchnavigation does not change the behavior of Up or Back.
  59. 59. However, a notable exception to this occurs when browsing between related detail views not tiedtogether by the referring list—for example, when browsing in the Play Store between apps from thesame developer, or albums by the same artist. In these cases, following each link does createhistory, causing the Back button to step through each previously viewed screen. Up shouldcontinue to bypass these related screens and navigate to the most recently viewed containerscreen.
  60. 60. You have the ability to make the Up behavior even smarter based on your knowledge of detail view.Extending the Play Store example from above, imagine the user has navigated from the last Book
  61. 61. viewed to the details for the Movie adaptation. In that case, Up can return to a container (Movies)which the user hasnt previously navigated through.Navigation into Your App via Home Screen Widgets and Notifications
  62. 62. You can use Home screen widgets or notifications to help your users navigate directly to screensdeep within your apps hierarchy. For example, Gmails Inbox widget and new message notificationcan both bypass the Inbox screen, taking the user directly to a conversation view.For both of these cases, handle the Up button as follows: If the destination screen is typically reached from one particular screen within your app, Up should navigate to that screen. Otherwise, Up should navigate to the topmost ("Home") screen of your app.In the case of the Back button, you should make navigation more predictable by inserting into thetasks back stack the complete upward navigation path to the apps topmost screen. This allowsusers whove forgotten how they entered your app to navigate to the apps topmost screen beforeexiting.As an example, Gmails Home screen widget has a button for diving directly to its compose screen.Up or Back from the compose screen would take the user to the Inbox, and from there the Backbutton continues to Home.Indirect notificationsWhen your app needs to present information about multiple events simultaneously, it can use asingle notification that directs the user to an interstitial screen. This screen summarizes theseevents, and provides paths for the user to dive deeply into the app. Notifications of this style arecalled indirect notifications.
  63. 63. Unlike standard (direct) notifications, pressing Back from an indirect notifications interstitialscreen returns the user to the point the notification was triggered from—no additional screens areinserted into the back stack. Once the user proceeds into the app from its interstitial screen, Up andBack behave as for standard notifications, as described above: navigating within the app ratherthan returning to the interstitial.For example, suppose a user in Gmail receives an indirect notification from Calendar. Touching thisnotification opens the interstitial screen, which displays reminders for several different events.Touching Back from the interstitial returns the user to Gmail. Touching on a particular event takesthe user away from the interstitial and into the full Calendar app to display details of the event.From the event details, Up and Back navigate to the top-level view of Calendar.
  64. 64. Pop-up notificationsPop-up notifications bypass the notification drawer, instead appearing directly in front of the user.They are rarely used, and should be reserved for occasions where a timely response is required andthe interruption of the users context is necessary. For example, Talk uses this style to alert theuser of an invitation from a friend to join a video chat, as this invitation will automatically expireafter a few seconds.In terms of navigation behavior, pop-up notifications closely follow the behavior of an indirectnotifications interstitial screen. Back dismisses the pop-up notification. If the user navigates fromthe pop-up into the notifying app, Up and Back follow the rules for standard notifications,navigating within the app.
  65. 65. Navigation Between AppsOne of the fundamental strengths of the Android system is the ability for apps to activate eachother, giving the user the ability to navigate directly from one app into another. For example, an appthat needs to capture a photo can activate the Camera app, which will return the photo to thereferring app. This is a tremendous benefit to both the developer, who can easily leverage codefrom other apps, and the user, who enjoys a consistent experience for commonly performedactions.To understand app-to-app navigation, its important to understand the Android framework behaviordiscussed below.Activities, tasks, and intentsIn Android, an activity is an application component that defines a screen of information and all ofthe associated actions the user can perform. Your app is a collection of activities, consisting ofboth the activities you create and those you re-use from other apps.A task is the sequence of activities a user follows to accomplish a goal. A single task can make useof activities from just one app, or may draw on activities from a number of different apps.An intent is a mechanism for one app to signal it would like another apps assistance in performingan action. An apps activities can indicate which intents they can respond to. For common intentssuch as "Share", the user may have many apps installed that can fulfill that request.Example: navigating between apps to support sharingTo understand how activities, tasks, and intents work together, consider how one app allows usersto share content by using another app. For example, launching the Play Store app from Homebegins new Task A (see figure below). After navigating through the Play Store and touching apromoted book to see its details, the user remains in the same task, extending it by addingactivities. Triggering the Share action prompts the user with a dialog listing each of the activities(from different apps) which have registered to handle the Share intent.
  66. 66. When the user elects to share via Gmail, Gmails compose activity is added as a continuation ofTask A—no new task is created. If Gmail had its own task running in the background, it would beunaffected.From the compose activity, sending the message or touching the Back button returns the user tothe book details activity. Subsequent touches of Back continue to navigate back through the PlayStore, ultimately arriving at Home.
  67. 67. However, by touching Up from the compose activity, the user indicates a desire to remain withinGmail. Gmails conversation list activity appears, and a new Task B is created for it. New tasks arealways rooted to Home, so touching Back from the conversation list returns there.
  68. 68. Task A persists in the background, and the user may return to it later (for example, via the Recentsscreen). If Gmail already had its own task running in the background, it would be replaced with TaskB—the prior context is abandoned in favor of the users new goal.When your app registers to handle intents with an activity deep within the apps hierarchy, referto Navigation into Your App via Home Screen Widgets and Notifications for guidance on how tospecify Up navigation.
  69. 69. 5) Action BarThe action bar is arguably the most important structural element of an Android app. Its a dedicatedpiece of real estate at the top of each screen that is generally persistent throughout the app.The main purpose of the action bar is to: Make important actions (such as New or Search, etc) prominent and accessible in a predictable way. Support consistent navigation and view switching within apps. Reduce clutter by providing an action overflow for rarely used actions. Provide a dedicated space for giving your app an identity.If youre new to writing Android apps, note that the action bar is one of the most important designelements you can implement. Following the guidelines described here will go a long way towardmaking your apps interface consistent with the core Android apps.General OrganizationThe action bar is split into four different functional areas that apply to most apps.1. App icon The app icon establishes your apps identity. It can be replaced with a different logo or branding if you wish. Important: If the app is currently not displaying the top-level screen, be sure to display the Up caret to the left of the app icon, so the user can navigate up the hierarchy. For more discussion of Up navigation, see the Navigation pattern.
  70. 70. App icon with and without "up" affordance.1. View control If your app displays data in different views, this segment of the action bar allows users to switch views. Examples of view-switching controls are drop-down menus or tab controls. If your app doesnt support different views, you can also use this space to display non- interactive content, such as an app title or longer branding information.2. Action buttons Show the most important actions of your app in the actions section. Actions that dont fit in the action bar are moved automatically to the action overflow.3. Action overflow Move less often used actions to the action overflow.Adapting to Rotation and Different Screen SizesOne of the most important UI issues to consider when creating an app is how to adjust to screenrotation on different screen sizes.You can adapt to such changes by using split action bars, which allow you to distribute action barcontent across multiple bars located below the main action bar or at the bottom of the screen.
  71. 71. Split action bar showing action buttons at the bottom of the screen in vertical orientation.Layout Considerations for Split Action BarsWhen splitting up content across multiple action bars, you generally have three possible locationsfor action bar content:1. Main action bar2. Top bar3. Bottom barIf the user can navigate up the hierarchy from a given screen, the main action bar contains the upcaret, at a minimum.To allow the user to quickly switch between the views your app provides, use tabs or a spinner inthe top bar.To display actions and, if necessary, the action overflow, use the bottom bar.
  72. 72. Contextual Action BarsA contextual action bar (CAB) is a temporary action bar that overlays the apps action bar for theduration of a particular sub-task. CABs are most typically used for tasks that involve acting onselected data or text.
  73. 73. Contextual action bar shown in Browser and GmailThe selection CAB appears after a long press on a selectable data item triggers selection mode.From here the user can: Select additional elements by touching them. Trigger an action from the CAB that applies to all selected data items. The CAB then automatically dismisses itself. Dismiss the CAB via the navigation bars Back button or the CABs checkmark button. This removes the CAB along with all selection highlights.Use CABs whenever you allow the user to select data via long press. You can control the actioncontent of a CAB in order to insert the actions you would like the user to be able to perform.For more information, refer to the Selection pattern.
  74. 74. Action Bar ElementsTabsTabs display app views concurrently and make it easy to explore and switch between them. Usetabs if you expect your users to switch views frequently.There are two types of tabs: fixed and scrollable.Scrollable tabsScrollable tabs always take up the entire width of the bar, with the currently active view item in thecenter, and therefore need to live in a dedicated bar. Scrollable tabs can themselves be scrolledhorizontally to bring more tabs into view.Use scrollable tabs if you have a large number of views or if youre unsure how many views will bedisplayed because your app inserts views dynamically (for example, open chats in a messagingapp that the user can navigate between). Scrollable tabs should always allow the user to navigatebetween the views by swiping left or right on the content area as well as swiping the tabsthemselves.Scrolling tabs in the Play Store app.Fixed tabsFixed tabs are always visible on the screen, and cant be moved out of the way like scrollable tabs.Fixed tabs in the main action bar can move to the top bar when the screen orientation changes.
  75. 75. Default fixed tabs shown in Holo Dark & Light.SpinnersA spinner is a drop-down menu that allows users to switch between views of your app.Use spinners rather than tabs in the main action bar if: You dont want to give up the vertical screen real estate for a dedicated tab bar. You expect your apps users to switch views infrequently.Action bar spinner from Calendar application.Action buttonsAction buttons on the action bar surface your apps most important activities. Think about whichbuttons will get used most often, and order them accordingly. Depending on available screen realestate, the system shows your most important actions as action buttons and moves the rest to theaction overflow. The action bar and the action overflow should only present actions to the user thatare available. If an action is unavailable in the current context, hide it. Do not show it as disabled.A sampling of action buttons used throughout the Gmail application.For guidance on prioritizing actions, use the FIT scheme.F — Frequent Will people use this action at least 7 out of 10 times they visit the screen? Will they typically use it several times in a row? Would taking an extra step every time truly be burdensome?
  76. 76. I — Important Do you want everyone to discover this action because its especially cool or a selling point? Is it something that needs to be effortless in the rare cases its needed?T — Typical Is it typically presented as a first-class action in similar apps? Given the context, would people be surprised if it were buried in the action overflow?If either F, I, or T apply, then its appropriate for the action bar. Otherwise, it belongs in the actionoverflow.Pre-defined glyphs should be used for certain common actions such as "refresh" and "share." Thedownload link below provides a package with icons that are scaled for various screen densities andare suitable for use with the Holo Light and Holo Dark themes. The package also includes unstyledicons that you can modify to match your theme, in addition to Adobe® Illustrator® source files forfurther customization.Download the Action Bar Icon PackAction overflowThe action overflow in the action bar provides access to your apps less frequently used actions.The overflow icon only appears on phones that have no menu hardware keys. Phones with menukeys display the action overflow when the user presses the key.Action overflow is pinned to the right side.How many actions will fit in the main action bar? Action bar capacity is controlled by the followingrules: Action buttons in the main action bar may not occupy more than 50% of the bars width. Action buttons on bottom action bars can use the entire width. The screen width in density-independent pixels (dp) determine the number of items that will fit in the main action bar: o smaller than 360 dp = 2 icons o 360-499 dp = 3 icons o 500-599 dp = 4 icons o 600 dp and larger = 5 icons
  77. 77. In the above table "o" denotes an action bar item and "=" an overflow icon.Sharing dataWhenever your app permits sharing of data, such as images or movie clips, use a share actionprovider in your action bar. The share action provider is designed to speed up sharing by displayingthe most recently used sharing service next to a spinner button that contains other sharing options.
  78. 78. The Gallery apps share action provider with extended spinner for additional sharing options.Action Bar ChecklistWhen planning your split action bars, ask yourself questions like these:How important is view navigation to the task?If view navigation is very important to your app, use tabs (for fastest view-switching) or spinners.Which of the apps actions need to be consistently available directly from the actionbar, and which can be moved to the action overflow?
  79. 79. Use the FIT scheme to decide if actions are displayed at the top-level or can be moved to the actionoverflow. If the number of top-level actions exceeds the capacity of the main action bar, displaythem separately in a bottom action bar.What else is important enough to warrant continuous display?Sometimes it is important to display contextual information for your app thats always visible.Examples are the number of unread messages in a messaging inbox view or the Now Playinginformation in a music player. Carefully plan which important information you would like to displayand structure your action bars accordingly.6) Multi-pane LayoutsWhen writing an app for Android, keep in mind that Android devices come in many different screensizes and types. Make sure that your app consistently provides a balanced and aestheticallypleasing layout by adjusting its content to varying screen sizes and orientations.Panels are a great way for your app to achieve this. They allow you to combine multiple views intoone compound view when a lot of horizontal screen real estate is available and by splitting them upwhen less space is available.Combining Multiple Views Into OneOn smaller devices your content is typically divided into a master grid or list view and a detail view.Touching an item in the master view opens a different screen showing that items detailinformation.
  80. 80. Because tablets have more screen real estate than phones, you can use panels to combine therelated list and detail views into a single compound view. This uses the additional space moreefficiently and makes navigating the app easier.
  81. 81. In general, use the pane on the right to present more information about the item you selected in theleft pane. Make sure to keep the item in the left pane selected in order to establish the relationshipbetween the panels.Compound Views and Orientation ChangesScreens should have the same functionality regardless of orientation. If you use a compound viewin one orientation, dont split it up when the user rotates the screen. There are several techniquesyou can use to adjust the layout after orientation change while keeping functional parity intact.
  82. 82. Stretch/compressAdjust the column width of your left pane to achieve a balanced layout in both orientations.StackRearrange the panels on your screen to match the orientation.
  83. 83. Expand/collapseWhen the device rotates, collapse the left pane view to only show the most important information.Provide an expand control that allows the user to bring the left pane content back to its originalwidth and vice versa.
  84. 84. Show/hideAfter rotating the device, show the right pane in fullscreen view. Use the Up icon in the action bar toshow the left panel and allow navigation to a different email. Hide the left panel by touching thecontent in the detail panel.
  85. 85. Checklist Plan in advance on how your app scales to different screen sizes and screen orientations. Identify the most appropriate method for the panels in your compound views to reorganize themselves when screen orientation changes. Look for opportunities to consolidate your views into multi-panel compound views. Make sure that your screens provide functional parity after the screen orientation changes.7) Swipe ViewsEfficient navigation is one of the cornerstones of a well-designed app. While apps are generallybuilt in a hierarchical fashion, there are instances where horizontal navigation can flatten verticalhierarchies and make access to related data items faster and more enjoyable. Swipe views allowthe user to efficiently move from item to item using a simple gesture and thereby make browsingand consuming data a more fluent experience.Swiping Between Detail ViewsAn apps data is often organized in a master/detail relationship: The user can view a list of relateddata items, such as images, chats, or emails, and then pick one of the items to see the detailcontents in a separate screen.
  86. 86. Master (left) and detail (right) views.On a phone, since the master and detail are on separate screens, this typically requires the user tojump back and forth between the list and the detail view, aka "pogo-sticking".In cases where users will want to view multiple detail items in succession, avoid pogo-sticking byusing the swipe gesture to navigate to the next/previous detail view.
  87. 87. Navigating between consecutive Email messages using the swipe gesture.Swiping Between TabsPeople app with swipe gesture navigation between top-level screens.If your app uses action bar tabs, use swipe to navigate between the different views.Checklist Use swipe to quickly navigate between detail views or tabs. Transition between the views as the user performs the swipe gesture. Do not wait for the gesture to complete and then transition between views. If you used buttons in the past for previous/next navigation, replace them with the swipe gesture. Consider adding contextual information in your detail view that informs the user about the relative list position of the currently visible item.
  88. 88. 9) SelectionAndroid 3.0 introduced the long press gesture—that is, a touch thats held in the same position for amoment—as the global gesture to select data. This affects the way you should handle multi-selectand contextual actions in your apps.What has changed?In previous versions of Android, the long press gesture was universally used to display contextualactions for a given data item in a contextual menu.This pattern changed with Android 3.0. The long press gesture is now used to select data,combining contextual actions and selection management functions for selected data into a newelement called the contextual action bar (CAB).Traditional use of the long press gesture to show contextual menus.Using the contextual action bar (CAB)The selection CAB is a temporary action bar that overlays your apps current action bar while datais selected. It appears after the user long presses on a selectable data item.
  89. 89. From here the user can: Select additional data items by touching them. Trigger an action from the CAB that applies to all highlighted data items. The CAB then automatically dismisses itself. Dismiss the CAB via the navigation bars Back button or the CABs checkmark button. This removes the CAB along with all selection highlights.Selecting CAB actionsYou can decide which actions and elements appear in the CAB. Use the guidelines in the Action Barpatternto decide which items to surface at the top level and which to move to the action overflow.Dynamically adjust CAB actionsIn most cases you need to adjust the actions in the CAB dynamically as the user adds more itemsto the selection. Actions that apply to a single selected data item dont necessarily apply to multipleselected data items of the same kind.
  90. 90. Adjusting actions in the CAB as additional items are selected.Checklist Whenever your app supports the selection of multiple data items, make use of the contextual action bar (CAB). Reserve the long press gesture for selection exclusively. Dont use it to display traditional contextual menus. If you dont support multi-selection within a list, long press should do nothing. Plan the actions you want to display inside of a CAB in the same way you would plan the actions inside your apps action bar.10) NotificationsThe notification system allows your app to keep the user informed about important events, such asnew messages in a chat app or a calendar event.To create an app that feels streamlined, pleasant, and respectful, it is important to design yournotifications carefully. Notifications embody your apps voice, and contribute to your appspersonality. Unwanted or unimportant notifications can annoy the user, so use them judiciously.When to display a notification
  91. 91. To create an application that people love, its important to recognize that the users attention andfocus is a resource that must be protected. To use an analogy that might resonate with softwaredevelopers, the user is not a method that can be invoked to return a value. The users focus is aresource more akin to a thread, and creating a notification momentarily blocks the user thread asthey process and then dismiss the interruptive notification.Androids notification system has been designed to quickly inform users of events while they focuson a task, but it is nonetheless still important to be conscientious when deciding to create anotification.While well behaved apps generally only speak when spoken to, there are some limited cases wherean app actually should interrupt the user with an unprompted notification.Notifications should be used primarily for time sensitive events, and especially if thesesynchronous events involve other people. For instance, an incoming chat is a real time andsynchronous form of communication: there is another user actively waiting on you to respond.Calendar events are another good example of when to use a notification and grab the usersattention, because the event is imminent, and calendar events often involve other people.When not to display a notificationThere are however many other cases where notifications should not be used: Dont notify the user of information that is not directed specifically at them, or information that is not truly time sensitive. For instance the asynchronous and undirected updates flowing through a social network do not warrant a real time interruption. Dont create a notification if the relevant new information is currently on screen. Instead, use the UI of the application itself to notify the user of new information directly in context. For instance, a chat application should not create system notifications while the user is actively chatting with another user. Dont interrupt the user for low level technical operations, like saving or syncing information, or updating an application, if it is possible for the system to simply take care of itself without involving the user.
  92. 92.  Dont interrupt the user to inform them of an error if it is possible for the application to quickly recover from the error on its own without the user taking any action. Dont use notifications for services that the user cannot manually start or stop. Dont create superfluous notifications just to get your brand in front of users. Such notifications will only frustrate and likely alienate your audience. The best way to provide the user with a small amount of updated information and to keep them engaged with your application is to develop a widget that they can choose to place on their home screen.Design Guidelines
  93. 93. Make it personalFor notifications of items sent by another user (such as a message or status update), include thatpersons image.Remember to include the app icon as a secondary icon in the notification, so that the user can stillidentify which app posted it.Navigate to the right placeWhen the user touches a notification, be open your app to the place where the user can consumeand act upon the data referenced in the notification. In most cases this will be the detail view of asingle data item (e.g. a message), but it might also be a summary view if the notification is stacked(see Stacked notifications below) and references multiple items. If in any of those cases the user istaken to a hierarchy level below your apps top-level, insert navigation into your apps back stack toallow them to navigate to your apps top level using the system back key. For more information, seethe chapter on System-to-app navigation in the Navigation design pattern.Timestamps for time sensitive eventsBy default, standard Android notifications include a timestamp in the upper right corner. Considerwhether the timestamp is valuable in the context of your notification. If the timestamp is notvaluable, consider if the event is important enough to warrant grabbing the users attention with anotification. If the notification is important enough, decide if you would like to opt out of displayingthe timestamp.Include a timestamp if the user likely needs to know how long ago the notification occurred. Goodcandidates for timestamps include communication notifications (email, messaging, chat,voicemail) where the user may need the timestamp information to understand the context of amessage or to tailor a response.Stack your notificationsIf your app creates a notification while another of the same type is still pending, avoid creating analtogether new notification object. Instead, stack the notification.
  94. 94. A stacked notification builds a summary description and allows the user to understand how manynotifications of a particular kind are pending.Dont:Do:If you keep the summary and detail information on different screens, a stacked notification mayneed to open to a different place in the app than a single notification.For example, a single email notification should always open to the content of the email, whereas astacked email notification opens to the Inbox view.Clean up after yourselfJust like calendar events, some notifications alert the user to an event that happens at a particularpoint in time. After that moment has passed, the notification is likely not important to the useranymore, and you should consider removing it automatically. The same is true for active chatconversations or voicemail messages the user has listened to, users should not have to manuallydismiss notifications independently from taking action on them.Provide a peek into your notification
  95. 95. You can provide a short preview of your notifications content by providing optional ticker text. Theticker text is shown for a short amount of time when the notification enters the system and thenhides automatically.Make notifications optionalUsers should always be in control of notifications. Allow the user to silence the notifications fromyour app by adding a notification settings item to your application settings.Use distinct iconsBy glancing at the notification area, the user should be able to discern what notification types arecurrently pending.Do: Look at the notification icons the Android apps already provide and create notification icons for your app that are sufficiently distinct in appearance.Dont: Use color to distinguish your app from others. Notification icons should generally be monochrome.Interacting With Notifications
  96. 96. Notifications are indicated by icons in the notification area and can be accessed by opening thenotification drawer.Inside the drawer, notifications are chronologically sorted with the latest one on top. Touching anotification opens the associated app to detailed content matching the notification. Swiping left orright on a notification removes it from the drawer.On tablets, the notification area is integrated with the system bar at the bottom of the screen. Thenotification drawer is opened by touching anywhere inside the notification area.Ongoing notificationsOngoing notifications keep users informed about an ongoing process in the background. Forexample, music players announce the currently playing track in the notification system andcontinue to do so until the user stops the playback. They can also be used to show the userfeedback for longer tasks like downloading a file, or encoding a video. Ongoing notifications cannotbe manually removed from the notification drawer.Dialogs and toasts are for feedback not notificationYour app should not create a dialog or toast if it is not currently on screen. Dialogs and Toastsshould only be displayed as the immediate response to the user taking an action inside of your app.For instance, dialogs can be used to confirm that the user understands the severity of an action,and toasts can echo back that an action has been successfully taken.
  97. 97. 10) SettingsSettings is a place in your app where users indicate their preferences for how your app shouldbehave. This benefits users because: You dont need to interrupt them with the same questions over and over when certain situations arise. The settings predetermine what will always happen in those situations (see design principle: Decide for me but let me have the final say). You help them feel at home and in control (see design principle: Let me make it mine).Flow and StructureProvide access to Settings in the action overflowSettings is given low prominence in the UI because its not frequently needed. Even if theres roomin the action bar, never make Settings an action button. Always keep it in the action overflow andlabel it "Settings". Place it below all other items except "Help".
  98. 98. Avoid the temptation to make everything a settingBecause Settings is a few navigational steps away, no matter how many items you have, theyllnever clutter up the core part of your UI. This may seem like good news, but it also poses achallenge.Settings can be a tempting place to keep a lot of stuff—like a hall closet where things get stashedwhen you tidy up before company comes over. Its not a place where you spend lots of time, so itseasy to rationalize and ignore its cluttered condition. But when users visit Settings—howeverinfrequently—theyll have the same expectations for the experience as they do everywhere else inyour app. More settings means more choices to make, and too many are overwhelming.So dont punt on the difficult product decisions and debates that can bring on the urge to "justmake it a setting". For each control youre considering adding to Settings, make sure it meets thebar:
  99. 99. If you still have lots of settings, group related settings togetherThe number of items an average human can hold in short-term memory is 7±2. If you present a listof 10 or more settings (even after applying the criteria above), users will have more difficultyscanning, comprehending, and processing them.You can remedy this by dividing some or all of the settings into groups, effectively turning one longlist into multiple shorter lists. A group of related settings can be presented in one of two ways:1. Under a section divider2. In a separate subscreenYou can use one or both these grouping techniques to organize your apps settings.For example, in the main screen of the Android Settings app, each item in the list navigates to asubscreen of related settings. In addition, the items themselves are grouped under section dividers.Grouping settings is not an exact science, but heres some advice for how to approach it, based onthe total number of settings in your app.7 or fewerDont group them at all. It wont benefit users and will seem like overkill.
  100. 100. 8 to 10Try grouping related settings under 1 or 2 section dividers. If you have any "singletons" (settingsthat dont relate to any other settings and cant be grouped under your section dividers), treat themas follows: If they include some of your most important settings, list them at the top without a section divider. Otherwise, list them at the bottom with a section divider called "OTHER", in order of importance.11 to 15Same advice as above, but try 2 to 4 section dividers.Also, try the following to reduce the list: If 2 or more of the settings are mainly for power users, move them out of your main Settings screen and into an "Advanced" subscreen. Place an item in the action overflow called "Advanced" to navigate to it. Look for "doubles": two settings that relate to one another, but not to any other settings. Try to combine them into one setting, using the design patterns described later in this section. For example, you might be able to redesign two related checkbox settings into one multiple choice setting.16 or moreIf you have any instances of 4 or more related settings, group them under a subscreen. Then usethe advice suggested above for the reduced list size.Design PatternsCheckboxUse this pattern for a setting that is either selected or not selected.
  101. 101. Multiple choiceUse this pattern for a setting that needs to present a discrete set of options, from which the usercan choose only one.
  102. 102. SliderUse this pattern for a setting where the range of values are not discrete and fall along a continuum.Date/timeUse this pattern for a setting that needs to collect a date and/or time from the user.
  103. 103. Subscreen navigationUse this pattern for navigating to a subscreen or sequence of subscreens that guide the userthrough a more complex setup process. If navigating to a single subscreen, use the same title in both the subscreen and the label navigating to it. If navigating to a sequence of subscreens (as in this example), use a title that describes the first step in the sequence.List subscreenUse this pattern for a setting or category of settings that contains a list of equivalent items.The label provides the name of the item, and secondary text may be used for status. (In thisexample, status is reinforced with an icon to the right of the label.) Any actions associated with thelist appear in the action bar rather than the list itself.
  104. 104. Master on/off switchUse this pattern for a category of settings that need a mechanism for turning on or off as a whole.An on/off switch is placed as the first item in the action bar of a subscreen. When the switch isturned off, the items in the list disappear, replaced by text that describes why the list is empty. Ifany actions require the switch to be on, they become disabled.
  105. 105. You can also echo the master on/off switch in the menu item that leads to the subscreen. However,you should only do this in cases where users rarely need to access the subscreen once its initiallyset up and more often just want to toggle the switch.Individual on/off switchUse this pattern for an individual setting that requires a more elaborate description than can beprovided in checkbox form.The on/off switch only appears in the subscreen so that users arent able to toggle it without alsobeing exposed to the descriptive text. Secondary text appears below the setting label to reflect thecurrent selection.In this example, Android Beam is on by default. Since users might not know what this setting does,we made the status more descriptive than just "On".
  106. 106. DependencyUse this pattern for a setting that changes availability based on the value of another setting.The disabled setting appears below its dependency, without any indentation. If the setting includesa status line, it says "Unavailable", and if the reason isnt obvious, a brief explanation is included inthe status.If a given setting is a dependency to 3 or more settings, consider using a subscreen with a masteron/off switch so that your main settings screen isnt cluttered by lots of disabled items.
  107. 107. DefaultsTake great care in choosing default values for each of your settings. Because settings determineapp behavior, your choices will contribute to users first impressions of your app. Even thoughusers can change settings, theyll expect the initial states to be sensible. The following questions(when applicable) may help inform your decisions: Which choice would most users be likely to choose on their own if there were no default? Which choice is the most neutral or middle-of-the-road? Which choice is the least risky, controversial, or over-the-top? Which choice uses the least amount of battery or mobile data? Which choice best supports the design principle Never lose my stuff? Which choice best supports the design principle Only interrupt me if its important?Writing GuidelinesLabel clearly and concisely
  108. 108. Writing a good label for a setting can be challenging because space is very limited. You only getone line, and its incredibly short on the smallest of devices. Follow these guidelines to make yourlabels brief, meaningful, and scannable: Write each label in sentence case (i.e. only the first word and proper nouns are capitalized). Dont start a label with an instructional verb like "Set", "Change", "Edit", "Modify", "Manage", "Use", "Select", or "Choose". Users already understand that they can do these things to settings. Likewise, dont end a label with a word like "setting" or "settings". Its already implied. If the setting is part of a grouping, dont repeat the word(s) used in the section divider or subscreen title. Avoid starting a label with a negative word like "Dont" or "Never". For example, "Dont allow" could be rephrased to "Block". Steer clear of technical jargon as much as possible, unless its a term widely understood by your target users. Use common verbs and nouns to convey the settings purpose rather than its underlying technology. Dont refer to the user. For example, for a setting allowing the user to turn notifications on or off, label it "Notifications" instead of "Notify me".Once youve decided on labels for your settings, be sure to preview them on an LDPI handset inportrait to make sure theyll fit everywhere.Secondary text below is for status, not description…Before Ice Cream Sandwich, we often displayed secondary text below a label to further describe itor provide instructions. Starting in Ice Cream Sandwich, were using secondary text for status.Before Screen timeout Adjust the delay before the screen automatically turns offAfterSleepAfter 10 minutes of activityStatus in secondary text has the following benefits:
  109. 109.  Users can see at a glance what the current value of a setting is without having to navigate any further. It applies the design principle Keep it brief, which users greatly appreciate.…unless its a checkbox settingTheres one important exception to the using secondary text for status: checkbox settings. Here,use secondary text for description, not status. Status below a checkbox is unnecessary becausethe checkbox already indicates it. The reason why its appropriate to have a description below acheckbox setting is because—unlike other controls—it doesnt display a dialog or navigate toanother screen where additional information can be provided.That said, if a checkbox settings label is clear enough on its own, theres no need to also provide adescription. Only include one if necessary.Follow these guidelines to write checkbox setting descriptions: Keep it to one sentence and dont use ending punctuation. Convey what happens when the setting is checked, phrased in the form of a command. Example: "Allow data exchange", not "Allows data exchange". Avoid repetition by choosing words that dont already appear in the label. Dont refer to the user unless its necessary for understanding the setting. If you must refer to the user, do so in the second person ("you") rather than the first person ("I"). Android speaks to users, not on behalf of them.Writing examplesThe following are examples of changes we made to labels and secondary text in the Settings app inIce Cream Sandwich.Before Use tactile feedbackAfterVibrate on touchIn this checkbox setting, we eliminated the throwaway word "Use" and rephrased the label to bemore direct and understandable.Before Screen timeout
  110. 110. Screen timeout Adjust the delay before the screen automatically turns offAfterSleepAfter 10 minutes of activityIn this multiple choice setting, we changed the label to a friendlier term and also replaced thedescription with status. We put some descriptive words around the selected value, "10 minutes",because on its own, the meaning could be misinterpreted as "sleep for 10 minutes".Before Change screen lock Change or disable pattern, PIN, or password securityAfterScreen lockPatternThis setting navigates to a a sequence of subscreens that allow users to choose a type of screenlock and then set it up. We eliminated the throwaway word "Change" in the label, and replaced thedescription with the current type of screen lock set up by the user. If the user hasnt set up a screenlock, the secondary text says "None".Before
  111. 111. NFC Use Near Field Communication to read and exchange tagsAfterNFCAllow data exchange whenthe phone touches anotherdeviceIn this checkbox setting—although its technical jargon—we kept the "NFC" label because: (1) wecouldnt find a clear, concise alternative, and (2) user familiarity with the acronym is expected toincrease dramatically in the next couple of years.We did, however, rewrite the description. Its far less technical than before and does a better job ofconveying how and why youd use NFC. We didnt include what the acronym stands for because itdoesnt mean anything to most users and would have taken up a lot of space.Checklist Make sure each item in Settings meets the criteria for belonging there. If you have more than 7 items, explore ways to group related settings. Use design patterns wherever applicable so users dont face a learning curve. Choose defaults that are safe, neutral, and fit the majority of users. Give each setting a clear, concise label and use secondary text appropriately.11) Backwards CompatibilitySignificant changes in Android 3.0 included:
  112. 112.  Deprecation of navigation hardware keys (Back, Menu, Search, Home) in favor of handling navigation via virtual controls (Back, Home, Recents). Robust pattern for the use of menus in action bars.Android 4.0 brings these changes for tablets to the phone platform.Adapting Android 4.0 to Older Hardware and AppsPhones with virtual navigation controlsAndroid apps written for Android 3.0 and later display actions in the action bar. Actions that dontfit in the action bar or arent important enough to be displayed at the top level appear in the actionoverflow.Users access the action overflow by touching it in the action bar.Phones with physical navigation keysAndroid phones with traditional navigation hardware keys dont display the virtual navigation bar atthe bottom of the screen. Instead, the action overflow is available from the menu hardware key. Theresulting actions popup has the same style as in the previous example, but is displayed at thebottom of the screen.
  113. 113. Legacy apps on phones with virtual navigation controlsWhen you run an app that was built for Android 2.3 or earlier on a phone with virtual navigationcontrols, an action overflow control appears at the right side of the virtual navigation bar. You cantouch the control to display the apps actions in the traditional Android menu styling.
  114. 114. 12) Pure AndroidMost developers want to distribute their apps on multiple platforms. As you plan your app forAndroid, keep in mind that different platforms play by different rules and conventions. Designdecisions that make perfect sense on one platform will look and feel misplaced in the context of adifferent platform. While a "design once, ship anywhere" approach might save you time up-front,you run the very real risk of creating inconsistent apps that alienate users. Consider the followingguidelines to avoid the most common traps and pitfalls.Dont mimic UI elements from other platformsPlatforms typically provide a carefully designed set of UI elements that are themed in a verydistinctive fashion. For example, some platforms advocate rounded corners for their buttons,others use gradients in their title bars. In some cases, elements may have the same purpose, butare designed to work a bit differently.As you build your app for Android, dont carry over themed UI elements from other platforms anddont mimic their specific behaviors. Review the Building Blockssection in this styleguide to learnabout Androids most important UI elements and the way they look in the system default themes.Also examine Androids platform apps to get a sense of how elements are applied in the context ofan app. If you want to customize the theme of UI elements, customize carefully according to yourspecific branding - and not according to the conventions of a different platform.Sampling of UI elements from Android, iOS and Windows Phone 7.Dont carry over platform-specific icons
  115. 115. Platforms typically provide sets of icons for common functionality, such as sharing, creating a newdocument or deleting.As you are migrating your app to Android, please swap out platform-specific icons with theirAndroid counterparts.You can find a wide variety of icons for use in your app on the Downloads page.Sampling of icons from Android, iOS and Windows Phone 7.Dont use bottom tab barsOther platforms use the bottom tab bar to switch between the apps views. Per platformconvention, Androids tabs for view control are shown in action bars at the top of the screeninstead. In addition, Android apps may use a bottom bar to display actions on a split action bar.You should follow this guideline to create a consistent experience with other apps on the Androidplatform and to avoid confusion between actions and view switching on Android.For more information on how to properly use action bars for view control, see Action Bars.
  116. 116. Android dialer with tabs in an action bar vs. bottom tabs in iOS.Dont hardcode links to other appsIn some cases you might want your app to take advantage of another apps feature set. Forexample, you may want to share the content that your app created via a social network ormessaging app, or view the content of a weblink in a browser. Dont use hard-coded, explicit linksto particular apps to achieve this. Instead, use Androids intent API to launch an activity chooserwhich lists all applications that are set up to handle the particular request. This lets the usercomplete the task with their preferred app. For sharing in particular, consider using theShare ActionProvider in your action bar to provide faster access to the users most recently used sharing target.
  117. 117. Link to other apps with the activity chooser or use the Share Action Provider in the action bar.Dont use labeled back buttons on action barsOther platforms use an explicit back button with label to allow the user to navigate up theapplications hierarchy. Instead, Android uses the main action bars app icon for hierarchicalnavigation and the navigation bars back button for temporal navigation. For more information,please review theNavigation pattern.Follow this guideline to provide a consistent navigation experience across the platform.
  118. 118. Android action bar with up caret vs. iOS labeled "Back" button.Dont use right-pointing carets on line itemsA common pattern on other platforms is the display of right-pointing carets on line items that allowthe user to drill deeper into additional content.Android does not use such indicators on drill-down line items. Avoid them to stay consistent withthe platform and in order to not have the user guess as to what the meaning of those carets maybe.
  119. 119. Android settings without right-pointing carets in line items vs. iOS settings.Device IndependenceRemember that your app will run on a wide variety of different screen sizes. Create visual assets fordifferent screen sizes and densities and make use of concepts such as multi-pane layouts toappropriately scale your UI on different device form factors.For more information, read Devices and Displays as well as Multi-pane Layouts in this designguide.
  120. 120. IV. Building BlocksYour inventory of ready-to-use elements for creating outstanding apps.Tabs1) TabsTabs in the action bar make it easy to explore and switch between different views or functionalaspects of your app, or to browse categorized data sets.
  121. 121. Scrollable TabsScrolling tab controls can contain a larger number of items than a standard tab control. Tonavigate to the next/previous view, swipe left or right.Scrolling tabs in the Play Store app.Fixed TabsFixed tabs display all items concurrently. To navigate to a different view, touch the tab.Tabs in Holo Dark & Light.Tabs in the YouTube app.Stacked TabsIf view navigation is essential to your app, you can break out tabs into a separate action bar. Thispermits fast view switching even on narrower screens.
  122. 122. 2) ListsLists present multiple line items in a vertical arrangement. They can be used for data selection aswell as drilldown navigation.
  123. 123. 1. Section Divider Use section dividers to organize the content of your list into groups and facilitate scanning. 2. Line Items List items can accommodate a wide range of data types in different arrangements, including simple single-line items, multi-line items, and custom items with icons, checkboxes, and action buttons.3) Grid Lists
  124. 124. Grid lists are an alternative to standard list views. They are best suited for showing data sets thatrepresent themselves through images. In contrast to simple lists, grid lists may scroll eithervertically or horizontally.Generic GridsThe items in a grid list are arranged in two dimensions, one of which is fixed when scrollingcontent. The scrolling direction dictates the ordering of the items within the grid list. Since thescrolling direction is not deterministic, make it easy for the user to determine the orientation bycutting off grid items to communicate where the overflow is located.Avoid creating grid lists that scroll in two dimensions.Vertical scrollingVertically scrolling grid list items are sorted in traditional western reading direction: left-to-rightand top-down. When displaying the list, cut off the items in the bottom row to communicate that
  125. 125. the user can scroll the list down to show additional items. Be sure to retain this scheme when theuser rotates the screen.Horizontal scrollingHorizontally scrolling lists fix the vertical axis of the item grid. Compared to vertically scrolling lists,the sorting changes slightly to a top-down and left-to-right arrangement. Employ the sametechnique of cutting off the items in the rightmost column to indicate the scrolling direction.Dont use scrolling tabs as a means to switch views in conjunction with horizontally scrolling gridlists, because the horizontal gesture for view and content navigation will conflict. If you showscrolling tabs for view navigation together with a grid list, use vertical grid scrolling for listnavigation.Grid List with LabelsUse labels to display additional contextual information for your grid list items.
  126. 126. StyleUse semi-transparent panels on top of the grid list items to display your labels. This allows you tocontrol the contrast and ensures legibility of the labels while letting the content "shine through".4) ScrollingScrolling allows the user to navigate to content in the overflow using a swipe gesture. The scrollingspeed is proportional to the speed of the gesture.Scroll IndicatorAppears during scrolling to indicate what portion of the content is currently in view.Index ScrollingIn addition to traditional scrolling, a long alphabetical list can also offer index scrolling: a way toquickly navigate to the items that begin with a particular letter. With index scrolling, a scrollindicator appears even when the user isnt scrolling. Touching or dragging it causes the currentletter to pop up in a prominent way.5) SpinnersSpinners provide a quick way to select one value from a set. In the default state, a spinner showsits currently selected value. Touching the spinner displays a dropdown menu with all otheravailable values, from which the user can select a new one.
  127. 127. Spinners in formsSpinners are useful for data picking in forms. They are compact and integrate nicely with othercomponents. Use spinners in forms for both simple data input and in combination with other inputfields. For example, a text field might let you edit an email address for a contact, while itsassociated spinner allows you to select whether its a Home or Work address.Spinners in action barsUse spinners in action bars to switch views. For example, Gmail uses a spinner to permit switchingbetween accounts or commonly used labels. Spinners are useful when changing the view isimportant to your app, but not necessarily a frequent occurrence. In cases where view switching isfrequent, use tabs.
  128. 128. Spinners in the Holo Dark and Holo Light themes, in various states.6) ButtonsA button consists of text and/or an image that clearly communicates what action will occur whenthe user touches it. Android supports two different types of buttons: basic buttons and borderlessbuttons. Both can contain text labels and/or images.Basic ButtonsBasic buttons are traditional buttons with borders and background. Android supports two styles forbasic buttons: default and small. Default buttons have slightly larger font size and are optimized fordisplay outside of form content. Small buttons are intended for display alongside other content.They have a smaller font and smaller minimum height. Use small buttons in forms where they needto align with other UI elements.