b est p ractices for u ser e xperience & ui. designing effective navigation implementing...
TRANSCRIPT
BEST PRACTICES FOR USER EXPERIENCE & UI
Designing Effective Navigation Implementing Effective Navigation Notifying the User Adding Search Functionality Designing for Multiple Screens Designing for TV Creating Custom Views Creating Backward-Compatible UIs Implementing Accessibility
DESIGNING EFFECTIVE NAVIGATION Planning Screens and Their Relationships Planning for Multiple Touchscreen Sizes Providing Descendant and Lateral Navigation Providing Ancestral and Temporal Navigation Putting it All Together: Wireframing
the Example App
PLANNING SCREENS AND THEIR RELATIONSHIPS
Using Entity-Relational Diagrams(ERD) to describe interactive relations
CREATE A SCREEN LIST
Considering what should we use to design the user interface in order to allow users clearly understand the operating way of our applications
Home or "launchpad" screen for accessing stories and photos List of categories List of news stories for a given category Story detail view (from which we can save and share) List of photos, uncategorized Photo detail view (from which we can save and share) List of all saved items List of saved photos List of saved stories
DIAGRAM SCREEN RELATIONSHIPS
Among all of our designed sets of screens is interfaces allowing users to change from one screen to another one,and we can express this as following example diagram.
GO BEYOND A SIMPLISTIC DESIGN
One’s screen design better have following functions to make UI more convenient and easy operating.
Buttons leading to different sections (e.g., stories, photos, saved items)
Vertical lists representing collections (e.g., story lists, photo lists, etc.)
Detail information (e.g., story view, full-screen photo view, etc.)
PLANNING FOR MULTIPLE TOUCHSCREEN SIZES
Although previous lesson make us understand how to design on perticular device,but there are still a lot of devices not considered,so we also needed to learn how to design application which can run on those devices.
GROUP SCREENS WITH MULTI-PANE LAYOUTS
GROUP SCREENS WITH MULTI-PANE LAYOUTS(CONT’D)
DESIGN FOR MULTIPLE TABLET ORIENTATIONS
While desining UI , we also need to consider how to arrange the screen arrangement when straightly holding or horizontally holding.
Stretch Expand/Collapse
Show/Hide Stack
GROUP SCREENS IN THE SCREEN MAP
Afterward , grouping these into larger map.
PROVIDING DESCENDANT AND LATERAL NAVIGATION
Navigation have two types:descendant and lateral navigation
And sibings also have two types:collection and section siblings
BUTTONS AND SIMPLE TARGETS
In section related screens, offering touchable and keyboard-focusable targets in the parent is generally the most straightforward and familiar kind of touch-based navigation interface. Which includes buttons, fixed-size list views, or text links
LISTS, GRIDS, CAROUSELS, AND STACKS
For collection-related screens, and especially for textual information, vertically scrolling lists are often the most straightforward and familiar kind of interface. For more visual or media-rich content items such as photos or videos, vertically scrolling grids of items, horizontally scrolling lists (sometimes referred to as carousels), or stacks (sometimes referred to as cards) can be used instead.
TABS
Using tabs is a very popular solution for lateral navigation. This pattern allows grouping of sibling screens, in that the tab content container in the parent screen can embed child screens that otherwise would be entirely separate contexts.
HORIZONTAL PAGING (SWIPE VIEWS)
Another popular lateral navigation pattern is horizontal paging, also referred to as swipe views. This pattern applies best to collection-related sibling screens, such as a list of categories (world, business, technology, and health stories)
PROVIDING ANCESTRAL AND TEMPORAL NAVIGATION
Now that users can navigate deep into the application's screen hierarchy, we need to provide a method for navigating up the hierarchy, to parent and ancestor screens.
SUPPORT TEMPORAL NAVIGATION: BACK
Temporal navigation, or navigation between historical screens, is deeply rooted in the Android system. All Android users expect the Back button to take them to the previous screen, regardless of other state. The set of historical screens is always rooted at the user's Launcher application (the phone's "home" screen).
PROVIDE ANCESTRAL NAVIGATION: UP AND HOME
Android 3.0 introduced the Up metaphor, which is presented in the Action Bar as a substitute for the Homebutton described above. Upon tapping Up, the user should be taken to the parent screen in the hierarchy. This navigation step is usually the previous screen (as described with the Back button discussion above), but this is not universally the case. Thus, developers must ensure that Up for each screen navigates to a single, predetermined parent screen.
PUTTING IT ALL TOGETHER: WIREFRAMING THE EXAMPLE APP
Now that we have a solid understanding of navigation patterns and screen grouping techniques, it's time to apply them to our screens.
IMPLEMENTING EFFECTIVE NAVIGATION
Implementing Lateral Navigation Implementing Ancestral Navigation Implementing Temporal Navigation Implementing Descendant Navigation
IMPLEMENTING LATERAL NAVIGATION
Lateral navigation is navigation between sibling screens in the application's screen hierarchy (sometimes referred to as a screen map). The most prominent lateral navigation patterns are tabs and horizontal paging (also known as swipe views).
IMPLEMENT TABS
Tabs allow the user to navigate between sibling screens by selecting the appropriate tab indicator available at the top of the display. In Android 3.0 and later, tabs are implemented using the ActionBar class, and are generally set up inActivity.onCreate().
Referencing related code: http://
developer.android.com/training/implementing-navigation/lateral.html
IMPLEMENTING ANCESTRAL NAVIGATION
Ancestral navigation is up the application's information hierarchy, where the top of the hierarchy (or root) is the application's home screen.
IMPLEMENT UP NAVIGATION
When implementing ancestral navigation, all screens in your application that aren't the home screen should offer a means of navigating to the immediate parent screen in the hierarchy via the Up button in the action bar.
Referencing related code: http://developer.android.com/training/implem
enting-navigation/ancestral.html
IMPLEMENTING TEMPORAL NAVIGATION
Temporal navigation is navigation to previously visited screens. Users can visit previous screens by pressing the device Backbutton. This user interface pattern is described further inProviding Ancestral and Temporal Navigation in Designing Effective Navigation and in Android Design: Navigation.
Android handles basic Back navigation for you (see Tasks and Back Stack for details on this behavior).
Referencing related code: http://developer.android.com/training/impleme
nting-navigation/temporal.html
IMPLEMENTING DESCENDANT NAVIGATION
Descendant navigation is navigation down the application's information hierarchy. This is described in Designing Effective Navigation and also covered in Android Design: Application Structure.
Descendant navigation is usually implemented using Intentobjects and startActivity(), or by adding fragments to an activity using FragmentTransaction objects.
IMPLEMENT MASTER/DETAIL FLOWS ACROSS HANDSETS AND TABLETS
In a master/detail navigation flow, a master screen contains a list of items in a collection, and a detail screen shows detailed information about a specific item within that collection. Implementing navigation from the master screen to the detail screen is one form of descendant navigation.
Referencing related topics: http://
developer.android.com/training/implementing-navigation/descendant.html
NOTIFYING THE USER
Building a Notification Preserving Navigation when Starting an Activi
ty Updating Notifications Using Big View Styles Displaying Progress in a Notification
BUILDING A NOTIFICATION
Referencing example code: http://
developer.android.com/training/notify-user/build-notification.html
PRESERVING NAVIGATION WHEN STARTING AN ACTIVITY
Part of designing a notification is preserving the user's expected navigation experience. For a detailed discussion of this topic, see the Notifications API guide. There are two general situations:
Regular activityYou're starting an Activity that's part of the application's normal workflow.Special activityThe user only sees this Activity if it's started from a notification. In a sense, the Activity extends the notification by providing information that would be hard to display in the notification itself.
Code:http://developer.android.com/training/notify-user/navigation.html
UPDATING NOTIFICATIONS
When you need to issue a notification multiple times for the same type of event, you should avoid making a completely new notification. Instead, you should consider updating a previous notification, either by changing some of its values or by adding to it, or both.
Referencing related code: http://developer.android.com/training/notify-u
ser/managing.html
USING BIG VIEW STYLES
Notifications in the notification drawer appear in two main visual styles, normal view and big view. The big view of a notification only appears when the notification is expanded. This happens when the notification is at the top of the drawer, or the user clicks the notification.
Codes: http://
developer.android.com/training/notify-user/expanded.html
DISPLAYING PROGRESS IN A NOTIFICATION
Notifications can include an animated progress indicator that shows users the status of an ongoing operation. If you can estimate how long the operation takes and how much of it is complete at any time, use the "determinate" form of the indicator (a progress bar). If you can't estimate the length of the operation, use the "indeterminate" form of the indicator (an activity indicator).
Referencing code: http://developer.android.com/training/notify-u
ser/display-progress.html
ADDING SEARCH FUNCTIONALITY
Setting up the Search Interface Storing and Searching for Data Remaining Backward Compatible
SETTING UP THE SEARCH INTERFACE
Beginning in Android 3.0, using the SearchView widget as an item in the action bar is the preferred way to provide search in your app.
Codes: http://developer.android.com/training/search/
setup.html
STORING AND SEARCHING FOR DATA
There are many ways to store your data, such as in an online database, in a local SQLite database, or even in a text file. It is up to you to decide what is the best solution for your application.
Code: http://
developer.android.com/training/search/search.html
REMAINING BACKWARD COMPATIBLE
The SearchView and action bar are only available on Android 3.0 and later. To support older platforms, you can fall back to the search dialog. The search dialog is a system provided UI that overlays on top of your application when invoked.
Codes:http://developer.android.com/training/search/backward-compat.html
DESIGNING FOR MULTIPLE SCREENS
Supporting Different Screen Sizes Supporting Different Screen Densities Implementing Adaptive UI Flows
SUPPORTING DIFFERENT SCREEN SIZES
Ensuring your layout can be adequately resized to fit the screen
Providing appropriate UI layout according to screen configuration
Ensuring the correct layout is applied to the correct screen
Providing bitmaps that scale correctly Codes:http
://developer.android.com/training/multiscreen/screensizes.html
SUPPORTING DIFFERENT DENSITIES
support different screen densities by providing different resources and using resolution-independent units of measurements.
Related information:http://developer.android.com/training/multiscreen/screendensities.html
IMPLEMENTING ADAPTATIVE UI FLOWS
Depending on the layout that your application is currently showing, the UI flow may be different. For example, if your application is in the dual-pane mode, clicking on an item on the left pane will simply display the content on the right pane; if it is in single-pane mode, the content should be displayed on its own (in a different activity).
Codes:http://developer.android.com/training/multiscreen/adaptui.html
DESIGNING FOR TV
Optimizing Layouts for TV Optimizing Navigation for TV Handling Features Not Supported on TV
OPTIMIZING LAYOUTS FOR TV
When your application is running on a television set, you should assume that the user is sitting about ten feet away from the screen. This user environment is referred to as the 10-foot UI. To provide your users with a usable and enjoyable experience, you should style and lay out your UI accordingly..
Code:http://developer.android.com/training/tv/optimizing-layouts-tv.html
OPTIMIZING NAVIGATION FOR TV
An important aspect of the user experience when operating a TV is the direct human interface: a remote control. As you optimize your Android application for TVs, you should pay special attention to how the user actually navigates around your application when using a remote control instead of a touchscreen.
Codes:http://developer.android.com/training/tv/optimizing-navigation-tv.html
HANDLING FEATURES NOT SUPPORTED ON TV
TVs are much different from other Android-powered devices:
1.They're not mobile. 2.Out of habit, people use them for watching
media with little or no interaction. 3.People interact with them from a distance. For TVs without features of Android-power
device,how to design codes is a challenge. Codes:http://developer.android.com/training/
tv/unsupported-features-tv.html
CREATING CUSTOM VIEWS
Creating a Custom View Class Implementing Custom Drawing Making the View Interactive Optimizing the View
CREATING A VIEW CLASS
A well-designed custom view is much like any other well-designed class. It encapsulates a specific set of functionality with an easy to use interface, it uses CPU and memory efficiently, and so forth. In addition to being a well-designed class, though, a custom view should:
Conform to Android standards Provide custom styleable attributes that work
with Android XML layouts Send accessibility events Be compatible with multiple Android platforms. http://developer.android.com/training/custom-v
iews/create-view.html
CUSTOM DRAWING
The most important part of a custom view is its appearance. Custom drawing can be easy or complex according to your application's needs.
Codes:http://developer.android.com/training/custom-views/custom-drawing.html
MAKING THE VIEW INTERACTIVE
Drawing a UI is only one part of creating a custom view. You also need to make your view respond to user input in a way that closely resembles the real-world action you're mimicking. Objects should always act in the same way that real objects do.
Codes:http://developer.android.com/training/custom-views/making-interactive.html
OPTIMIZING THE VIEW
Now that you have a well-designed view that responds to gestures and transitions between states, you need to ensure that the view runs fast. To avoid a UI that feels sluggish or stutters during playback, you must ensure that your animations consistently run at 60 frames per second
Related information:http://developer.android.com/training/custom-views/optimizing-view.html
CREATING BACKWARD-COMPATIBLE
UIS Abstracting the New APIs Proxying to the New APIs Creating an Implementation with Older APIs Using the Version-Aware Component
ABSTRACTING THE NEW APIS
Suppose you want to use action bar tabs as the primary form of top-level navigation in your application. Unfortunately, theActionBar APIs are only available in Android 3.0 or later (API level 11+). Thus, if you want to distribute your application to devices running earlier versions of the platform, you need to provide an implementation that supports the newer API while providing a fallback mechanism that uses older APIs.
Related Information:http://developer.android.com/training/backward-compatible-ui/abstracting.html
PROXYING TO THE NEW APIS
This lesson shows you how to subclass the CompatTab andTabHelper abstract classes and use new APIs. Your application can use this implementation on devices running a platform version that supports them.
Related information:http://developer.android.com/training/backward-compatible-ui/new-implementation.html
CREATING AN IMPLEMENTATION WITH OLDER APIS
The most challenging task in using newer UI features in a backward-compatible way is deciding on and implementing an older (fallback) solution for older platform versions. In many cases, it's possible to fulfill the purpose of these newer UI components using older UI framework features.
http://developer.android.com/training/backward-compatible-ui/older-implementation.html#decide-substitute
USING THE VERSION-AWARE COMPONENT
Now that you have two implementations of TabHelper andCompatTab—one for Android 3.0 and later and one for earlier versions of the platform—it's time to do something with these implementations.
Codes:http://developer.android.com/training/backward-compatible-ui/using-component.html
IMPLEMENTING ACCESSIBILITY
Developing Accessible Applications Developing Accessibility Services
DEVELOPING ACCESSIBLE APPLICATIONS
Android has several accessibility-focused features baked into the platform, which make it easy to optimize your application for those with visual or physical disabilities. However, it's not always obvious what the correct optimizations are, or the easiest way to leverage the framework toward this purpose.
Related information:http://developer.android.com/training/accessibility/accessible-app.html
DEVELOPING AN ACCESSIBILITY SERVICE
Accessibility services are a feature of the Android framework designed to provide alternative navigation feedback to the user on behalf of applications installed on Android devices. An accessibility service can communicate to the user on the application's behalf, such as converting text to speech, or haptic feedback when a user is hovering on an important area of the screen.
Codes:http://developer.android.com/training/accessibility/service.html