Thursday, March 14, 2013

Pure Android


Pure Android


Most developers want to distribute their apps on multiple platforms. As you plan your app for Android, keep in mind that different platforms play by different rules and conventions. Design decisions that make perfect sense on one platform will look and feel misplaced in the context of a different 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 following guidelines to avoid the most common traps and pitfalls.

Don't mimic UI elements from other platforms

Platforms typically provide a carefully designed set of UI elements that are themed in a very distinctive 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, but are designed to work a bit differently.
As you build your app for Android, don't carry over themed UI elements from other platforms and don't mimic their specific behaviors. Review the Building Blockssection in this styleguide to learn about Android's most important UI elements and the way they look in the system default themes. Also examine Android's platform apps to get a sense of how elements are applied in the context of an app. If you want to customize the theme of UI elements, customize carefully according to your specific branding - and not according to the conventions of a different platform.

Sampling of UI elements from Android, iOS and Windows Phone 7.

Don't carry over platform-specific icons

Platforms typically provide sets of icons for common functionality, such as sharing, creating a new document or deleting.
As you are migrating your app to Android, please swap out platform-specific icons with their Android 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.

Don't use bottom tab bars

Other platforms use the bottom tab bar to switch between the app's views. Per platform convention, Android's tabs for view control are shown in action bars at the top of the screen instead. 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 Android platform 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.

Android dialer with tabs in an action bar vs. bottom tabs in iOS.

Don't hardcode links to other apps

In some cases you might want your app to take advantage of another app's feature set. For example, you may want to share the content that your app created via a social network or messaging app, or view the content of a weblink in a browser. Don't use hard-coded, explicit links to particular apps to achieve this. Instead, use Android's intent API to launch an activity chooser which lists all applications that are set up to handle the particular request. This lets the user complete the task with their preferred app. For sharing in particular, consider using theShare Action Provider in your action bar to provide faster access to the user's most recently used sharing target.

Link to other apps with the activity chooser or use the Share Action Provider in the action bar.

Don't use labeled back buttons on action bars

Other platforms use an explicit back button with label to allow the user to navigate up the application's hierarchy. Instead, Android uses the main action bar's app icon for hierarchical navigation and the navigation bar's back button for temporal navigation. For more information, please review theNavigation pattern.
Follow this guideline to provide a consistent navigation experience across the platform.

Android action bar with up caret vs. iOS labeled "Back" button.

Don't use right-pointing carets on line items

A common pattern on other platforms is the display of right-pointing carets on line items that allow the user to drill deeper into additional content.
Android does not use such indicators on drill-down line items. Avoid them to stay consistent with the platform and in order to not have the user guess as to what the meaning of those carets may be.

Android settings without right-pointing carets in line items vs. iOS settings.

Device Independence


Remember that your app will run on a wide variety of different screen sizes. Create visual assets for different screen sizes and densities and make use of concepts such as multi-pane layouts to appropriately scale your UI on different device form factors.
Source: http://developer.android.com

Wednesday, March 13, 2013

New in Android


New in Android


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 theCompatibility 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.