diff --git a/docs/html/design/building-blocks/progress.jd b/docs/html/design/building-blocks/progress.jd index 03fc09c7302cb..7342387a28f4f 100644 --- a/docs/html/design/building-blocks/progress.jd +++ b/docs/html/design/building-blocks/progress.jd @@ -1,19 +1,14 @@ -page.title=Progress and Activity +page.title=Progress & Activity @jd:body -

When an operation of interest to the user is taking place over a relatively long period of time, -provide visual feedback that it's still happening and in the process of being completed.

-

Progress

+

Progress bars and activity indicators signal to users that something is happening that will take a moment.

+

Progress bars

-

If you know the percentage of the operation that has been completed, use a determinate progress bar -to give the user a sense of how much longer it will take.

+

Progress bars are for situations where the percentage completed can be determined. They give users a quick sense of how much longer an operation will take.

-

The progress bar should always travel from 0% to 100% completion. Avoid setting the bar to a lower -value than a previous value, or using the same progress bar to represent the progress of multiple -events, since doing so makes the display meaningless. If you're not sure how long a particular -operation will take, use an indeterminate progress indicator.

+

A progress bar should always fill from 0% to 100% and never move backwards to a lower value. If multiple operations are happening in sequence, use the progress bar to represent the delay as a whole, so that when the bar reaches 100%, it doesn't return back to 0%.

 
@@ -22,12 +17,11 @@ operation will take, use an indeterminate progress indicator.

Progress bar in Holo Dark and Holo Light. -

Activity

+

Activity indicators

-

If you don't know how much longer an operation will continue, use an indeterminate progress -indicator. There are two styles available: a flat bar and a circle. Use the one that best fits the -available space.

+

Activity indicators are for operations of an indeterminate length. They ask users to wait a moment while something finishes up, without getting into specifics about what's happening behind the scenes.

+

Two styles are available: a bar and a circle. Each is offered in a variety of sizes, in both Holo Light and Holo Dark themes. Choose the appropriate style and size for the surrounding context. For example, the largest activity circle works well when displayed in a blank content area, but not in a smaller dialog box. Each operation should only be represented by one activity indicator.

@@ -38,14 +32,8 @@ available space.

    -
  1. Activity bar (shown with the Holo Dark theme)

    -

    - -An indeterminate activity bar is used at the start of an application download because the Play Store -app hasn't been able to contact the server yet, and it's not possible to determine how long it will -take for the download to begin. - -

    +
  2. Activity bar

    +

    In this example, an activity bar (in Holo Dark) appears when a user first requests a download. There's an unknown period of time when the download has not yet started. As soon as the download starts, this activity bar transforms into a progress bar.

@@ -61,12 +49,19 @@ take for the download to begin.
    -
  1. Activity circle (shown with the Holo Light theme)

    +
  2. Activity circle

    +

    In this example, an activity circle (in Holo Light) is used in the Gmail application when a message is being loaded because it's not possible to determine how long it will take to download the email.

    +

    When displaying an activity circle, do not include text to communicate what the app is doing. The moving circle alone provides sufficient feedback about the delay, and does so in an understated way that minimizes the impact.

    - -An indeterminate activity circle is used in the Gmail application when a message is being -loaded because it's not possible to determine how long it will take to download the email. - +

    +
    Don't
    + +
    + +
    +
    Do
    + +

@@ -74,6 +69,34 @@ loaded because it's not possible to determine how long it will take to download
-

You should only use one activity indicator on screen per activity, and it should appropriately sized -for the surrounding context. For example, the largest activity circle works well when displayed in a -blank content area, but not in a smaller dialog box.

+

Custom indicators

+

The standard progress bar and activity indicators work well for most situations and should be used whenever possible to provide a consistent experience across Android. However, some situations may call for something more custom.

+ +

Here's an example:
+In all of the Google Play apps (Music, Books, Movies, Magazines), we wanted the current download state of each item to be visible at all times at the top-level screen. These states are: +

+

+

We also needed to indicate progress from one download state to another, because downloading is not instantaneous.

+

This presented a challenge, because the Google Play apps use a variety of different layouts, and some of them are highly space-constrained. We didn't want this information to clutter the top-level screens, or compete too much with the cover art.

+

So we designed a custom indicator that could show all of the information in a tiny footprint, with the flexibility to appear on top of content if necessary.

+ + + +

The color indicates whether it's downloaded (blue) or not (gray). The appearance of the pin indicates whether the download is permanent (white, upright) or temporary (gray, diagonal). And when state is in the process of changing, progress is indicated by a moving pie chart.

+ +
+
+ +
+
+
+ Across Google Play apps with different layouts, the same custom indicator appears with each item. It communicates download state as well as progress, in a compact package that can be incorporated into any screen design. +
+
+
+ +

If you find that the standard indicators aren't meeting your needs (due to space constraints, state complexities), by all means design your own. Make it feel like part of the Android family by injecting some of the visual characteristics of the standard indicators. In this example, we carried over the circular shape, the same shade of blue, and the flat and simple style.

diff --git a/docs/html/design/design_toc.cs b/docs/html/design/design_toc.cs index 98efa350fa46b..72007f59bf6b8 100644 --- a/docs/html/design/design_toc.cs +++ b/docs/html/design/design_toc.cs @@ -26,7 +26,7 @@ diff --git a/docs/html/design/media/confirm_ack_acknowledge.png b/docs/html/design/media/confirm_ack_acknowledge.png new file mode 100644 index 0000000000000..b78eb14a36214 Binary files /dev/null and b/docs/html/design/media/confirm_ack_acknowledge.png differ diff --git a/docs/html/design/media/confirm_ack_confirming.png b/docs/html/design/media/confirm_ack_confirming.png new file mode 100644 index 0000000000000..20a9c02470ab9 Binary files /dev/null and b/docs/html/design/media/confirm_ack_confirming.png differ diff --git a/docs/html/design/media/confirm_ack_draft_deleted.png b/docs/html/design/media/confirm_ack_draft_deleted.png new file mode 100644 index 0000000000000..f189db930c94a Binary files /dev/null and b/docs/html/design/media/confirm_ack_draft_deleted.png differ diff --git a/docs/html/design/media/confirm_ack_ex_beam.png b/docs/html/design/media/confirm_ack_ex_beam.png new file mode 100644 index 0000000000000..d099912d4c9f1 Binary files /dev/null and b/docs/html/design/media/confirm_ack_ex_beam.png differ diff --git a/docs/html/design/media/confirm_ack_ex_books.png b/docs/html/design/media/confirm_ack_ex_books.png new file mode 100644 index 0000000000000..634d7b970c71c Binary files /dev/null and b/docs/html/design/media/confirm_ack_ex_books.png differ diff --git a/docs/html/design/media/confirm_ack_ex_draftsave.png b/docs/html/design/media/confirm_ack_ex_draftsave.png new file mode 100644 index 0000000000000..473368d8b1be8 Binary files /dev/null and b/docs/html/design/media/confirm_ack_ex_draftsave.png differ diff --git a/docs/html/design/media/confirm_ack_ex_plus1.png b/docs/html/design/media/confirm_ack_ex_plus1.png new file mode 100644 index 0000000000000..6de6710c9c37a Binary files /dev/null and b/docs/html/design/media/confirm_ack_ex_plus1.png differ diff --git a/docs/html/design/media/confirm_ack_ex_removeapp.png b/docs/html/design/media/confirm_ack_ex_removeapp.png new file mode 100644 index 0000000000000..0abacce1785e7 Binary files /dev/null and b/docs/html/design/media/confirm_ack_ex_removeapp.png differ diff --git a/docs/html/design/media/confirm_ack_flowchart.png b/docs/html/design/media/confirm_ack_flowchart.png new file mode 100644 index 0000000000000..277cb11e74a95 Binary files /dev/null and b/docs/html/design/media/confirm_ack_flowchart.png differ diff --git a/docs/html/design/media/iconography_notification_focal.png b/docs/html/design/media/iconography_notification_focal.png index 20d5e8f0eed7c..f21954f118376 100644 Binary files a/docs/html/design/media/iconography_notification_focal.png and b/docs/html/design/media/iconography_notification_focal.png differ diff --git a/docs/html/design/media/new_accessibility.png b/docs/html/design/media/new_accessibility.png new file mode 100644 index 0000000000000..864ee5c474930 Binary files /dev/null and b/docs/html/design/media/new_accessibility.png differ diff --git a/docs/html/design/media/new_notifications.png b/docs/html/design/media/new_notifications.png new file mode 100644 index 0000000000000..1d9bcf5d242db Binary files /dev/null and b/docs/html/design/media/new_notifications.png differ diff --git a/docs/html/design/media/new_widgets.png b/docs/html/design/media/new_widgets.png new file mode 100644 index 0000000000000..7e6201b11124e Binary files /dev/null and b/docs/html/design/media/new_widgets.png differ diff --git a/docs/html/design/media/progress_activity_custom.png b/docs/html/design/media/progress_activity_custom.png new file mode 100644 index 0000000000000..2bfdd521a8ee5 Binary files /dev/null and b/docs/html/design/media/progress_activity_custom.png differ diff --git a/docs/html/design/media/progress_activity_custom_app.png b/docs/html/design/media/progress_activity_custom_app.png new file mode 100644 index 0000000000000..e572508235386 Binary files /dev/null and b/docs/html/design/media/progress_activity_custom_app.png differ diff --git a/docs/html/design/media/progress_activity_do.png b/docs/html/design/media/progress_activity_do.png new file mode 100644 index 0000000000000..fd224367f09a7 Binary files /dev/null and b/docs/html/design/media/progress_activity_do.png differ diff --git a/docs/html/design/media/progress_activity_dont.png b/docs/html/design/media/progress_activity_dont.png new file mode 100644 index 0000000000000..08c4b5d29a49d Binary files /dev/null and b/docs/html/design/media/progress_activity_dont.png differ diff --git a/docs/html/design/patterns/confirming-acknowledging.jd b/docs/html/design/patterns/confirming-acknowledging.jd new file mode 100644 index 0000000000000..28e4427844c80 --- /dev/null +++ b/docs/html/design/patterns/confirming-acknowledging.jd @@ -0,0 +1,76 @@ +page.title=Confirming & Acknowledging +@jd:body + +

In some situations, when a user invokes an action in your app, it's a good idea to confirm or acknowledge that action through text.

+ +
+
+ +

Confirming is asking the user to verify that they truly want to proceed with an action they just invoked. In some cases, the confirmation is presented along with a warning or critical information related to the action that they need to consider.

+
+
+ +

Acknowledging is displaying text to let the user know that the action they just invoked has been completed. This removes uncertainty about implicit operations that the system is taking. In some cases, the acknowledgment is presented along with an option to undo the action.

+
+
+ +

Communicating to users in these ways can help alleviate uncertainty about things that have happened or will happen. Confirming or acknowledging can also prevent users from making mistakes they might regret.

+ +

When to Confirm or Acknowledge User Actions

+

Not all actions warrant a confirmation or an acknowledgment. Use this flowchart to guide your design decisions.

+ + +

Confirming

+
+
+ +

Example: Google Play Books

+

In this example, the user has requested to delete a book from their Google Play library. A dialog appears to confirm this action because it's important to understand that the book will no longer be available from any device.

+

When crafting a confirmation dialog, make the title meaningful by echoing the requested action.

+ +
    +
  • Don't

    Are you sure?

  • +
  • Don't

    Warning!

  • +
  • Do

    Delete from library?

  • +
+ +
+
+ +

Example: Android Beam

+

Confirmations don't necessarily have to be presented in a dialog with two buttons. After initiating Android Beam, the user is prompted to touch the content to be shared (in this example, it's a photo). If they decide not to proceed, they simply move their phone away.

+
+
+ +

Acknowledging

+
+
+ +

Example: Abandoned Gmail draft saved

+

In this example, if the user navigates back or up from the Gmail compose screen, something possibly unexpected happens: the current draft is automatically saved. An acknowledgment in the form of a toast makes that apparent. It fades after a few seconds.

+

Undo isn't appropriate here because saving was initiated by the app, not the user. And it's quick and easy to resume composing the message by navigating to the list of drafts.

+ +
+
+ +

Example: Gmail conversation deleted

+

After the user deletes a conversation from the list in Gmail, an acknowledgment appears with an undo option. The acknowledgment remains until the user takes an unrelated action, such as scrolling the list.

+
+
+ +

No Confirmation or Acknowledgment

+
+
+ +

Example: Removing an app from the Home Screen

+

Confirmation is unnecessary. This is a deliberate action: the user must drag and drop an item onto a relatively large and isolated target. Therefore, accidents are highly unlikely. But if the user regrets the decision, it only takes a few seconds to bring it back again.

+

Acknowledgment is unnecessary. The user will know the app is gone from the Home Screen because they made it disappear by dragging it away.

+ +
+
+ +

Example: +1'ing

+

Confirmation is unnecessary. If the user +1'd by accident, it's not a big deal. They can just touch the button again to undo the action.

+

Acknowledgment is unnecessary. The user will see the +1 button bounce and turn red. That's a very clear signal.

+
+
\ No newline at end of file diff --git a/docs/html/design/patterns/help.jd b/docs/html/design/patterns/help.jd index 4a92c7bb53f8a..e42ea26cbb275 100644 --- a/docs/html/design/patterns/help.jd +++ b/docs/html/design/patterns/help.jd @@ -24,11 +24,11 @@ page.title=Help
  1. High value -

    Without it, users wouldn't be able to customize the most frequently-visited Android screen to meet their needs.

  2. +

    Without it, users wouldn't be able to customize the most frequently-visited Android screen to meet their needs.

  3. Available only through a gesture -

    Users can't do this through a button or a menu.

  4. +

    Users can't do this through a button or a menu.

  5. Atypical for the gesture -

    Many high value functions invoked through a gesture - like scrolling, swiping tabs, and turning pages - are common and yield expected results. Users will be able to discover them in your app, and unsolicited help is unnecessary. But here, the gesture does something unexpected: press and hold doesn't just select an app, it also immediately navigates to the Home Screen and creates a shortcut to the app that can then be dragged around.

  6. +

    Many high value functions invoked through a gesture - like scrolling, swiping tabs, and turning pages - are common and yield expected results. Users will be able to discover them in your app, and unsolicited help is unnecessary. But here, the gesture does something unexpected: press and hold doesn't just select an app, it also immediately navigates to the Home Screen and creates a shortcut to the app that can then be dragged around.

However, this is an exceptional case. Most functionality doesn't meet all three of these criteria.

diff --git a/docs/html/design/patterns/new-4-0.jd b/docs/html/design/patterns/new-4-0.jd deleted file mode 100644 index 91ebba7e9cfdb..0000000000000 --- a/docs/html/design/patterns/new-4-0.jd +++ /dev/null @@ -1,71 +0,0 @@ -page.title=New in Android 4.0 -@jd:body - -
-
- -

Navigation bar

-

Android 4.0 removes the need for traditional hardware keys on phones by replacing them with a -virtual navigation bar that houses the Back, Home and Recents buttons. Read the -Compatibility 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.

- -
-
- - - -
-
- -
 
- -
-
- -

Action bar

-

The action bar is the most important structural element of an Android app. It provides consistent -navigation across the platform and allows your app to surface actions.

- -
-
- - - -
-
- -
 
- -
-
- -

Multi-pane layouts

-

Creating apps that scale well across different form factors and screen sizes is important in the -Android world. Multi-pane layouts allow you to combine different activities that show separately on -smaller devices into richer compound views for tablets.

- -
-
- - - -
-
- -
 
- -
-
- -

Selection

-

The long press gesture which was traditionally used to show contextual actions for objects is now -used for data selection. When selecting data, contextual action bars allow you to surface actions.

- -
-
- - - -
-
diff --git a/docs/html/design/patterns/new.jd b/docs/html/design/patterns/new.jd new file mode 100644 index 0000000000000..1fc49878839d2 --- /dev/null +++ b/docs/html/design/patterns/new.jd @@ -0,0 +1,114 @@ +page.title=New in Android +@jd:body + +

Jelly Bean - Android 4.1

+ +

Notifications

+
+
+

Notifications have received some notable enhancements in Android 4.1:

+
    +
  • Users can act on notifications immediately from the drawer
  • +
  • Notifications are more flexible in size and layout
  • +
  • A priority flag helps sort notifications by importance
  • +
  • Notifications can be collapsed and expanded
  • +
+ +

The base notification layout has not changed, so app notifications designed for versions earlier than Jelly Bean still look and work the same. Check the updated Notifications page for more details.

+
+
+ +
+
+ +
 
+ +

Resizable Application Widgets

+
+
+

Widgets are an essential aspect of home screen customization, allowing "at-a-glance" views of an app's most important data and functionality right from the user's home screen. Android 4.1 introduces improved App Widgets that can automatically resize and load different content based upon a number of factors including:

+
    +
  • Where the user drops them on the home screen
  • +
  • The size to which the user expands them
  • +
  • The amount of room available on the home screen
  • +
+ +

You can supply separate landscape and portrait layouts for your widgets, which the system inflates as appropriate when the screen orientation changes. The Application Widgets has useful details about widget types, limitations, and design considerations.

+
+
+ +
+
+ +
 
+ +

Accessibility

+
+
+

One of Android's missions is to organize the world's information and make it universally accessible and useful. Our mission applies to all users-including people with disabilities such as visual impairment, color deficiency, hearing loss, and limited dexterity.

+

The new Accessibility page provides details on how to design your app to be as accessible as possible by:

+
    +
  • Making navigation intuitive
  • +
  • Using recommended touch target sizes
  • +
  • Labeling visual UI elements meaningfully
  • +
  • Providing alternatives to affordances that time out
  • +
  • Using standard framework controls or enable TalkBack for custom controls
  • +
  • Trying it out yourself
  • +
+ +

You can supply separate landscape and portrait layouts for your widgets, which the system inflates as appropriate when the screen orientation changes. The [Application Widgets] (should be link) has useful details about widget types, limitations, and design considerations.

+
+
+ +
+
+ +

Ice Cream Sandwich - Android 4.0

+ +

Navigation bar

+
+
+

Android 4.0 removes the need for traditional hardware keys on phones by replacing them with a + virtual navigation bar that houses the Back, Home and Recents buttons. Read the Compatibility 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.

+
+
+ +
+
+ +
 
+ +

Action bar

+
+
+

The action bar is the most important structural element of an Android app. It provides consistent navigation across the platform and allows your app to surface actions.

+
+
+ +
+
+ +
 
+ +

Multi-pane layouts

+
+
+

Creating apps that scale well across different form factors and screen sizes is important in the Android world. Multi-pane layouts allow you to combine different activities that show separately on smaller devices into richer compound views for tablets.

+
+
+ +
+
+ +
 
+ +

Selection

+ +
+
+

The long press gesture which was traditionally used to show contextual actions for objects is now used for data selection. When selecting data, contextual action bars allow you to surface actions.

+
+
+ +
+