Google’s Honeycomb operating system is specifically optimized for large-screened tablets, but the first bits of the new platform are starting to now filter down into Android smartphones. The Android Developer Blog notes the release of an “Android Compatibility Package” that includes a new Fragments API for developers building software for Android 1.6 and up. Fragments are a key element for Honeycomb tablets such as Motorola’s Xoom, as they allow for multiple windows of activity on the device display, which can greatly increase the usability of an app.
Here’s how Google described these fragments when it announced the Honeycomb platform capabilities:
“[D]evelopers can break the Activities of their applications into subcomponents called Fragments, then combine them in a variety of ways to create a richer, more interactive experience. For example, an application can use a set of Fragments to create a true multipane UI, with the user being able to interact with each pane independently. Fragments can be added, removed, replaced, and animated inside an Activity dynamically, and they are modular and reusable across multiple Activities. Because they are modular, Fragments also offer an efficient way for developers to write applications that can run properly on both larger screen as well as smaller screen devices.”
The multi-pane user interface is key for certain applications on an Android tablet. Google’s Gmail app on the Xoom is a perfect example. Instead of a single screen showing a simple listing of emails, the Gmail app shows multiple panes that vary based on user interaction, much like the Mail app on Apple’s iPad. The main view shows Inboxes and folders in a small fragment, while a larger pane displays a listing of the emails in a specific folder. Taking action on an email moves the folder fragments off-screen so the user’s full focus is on the action of the action at hand, which could be a mail reply, for example. And fragments can pass data back and forth. An email can be dragged from a list fragment to the folder fragment for filing, something not yet supported on iOS. Here’s a series of three images to demonstrate this in action:
So what does that mean for smartphone applications? Android developers can design applications with interactive panes, either on the same screen or by using virtual screens where the user swipes from one pane to another. Fragments will work best for large-screen devices, where it visually makes sense to use two fragments together, like in a Twitter app that could show a user’s tweet list and a short profile below that. The passing of data between views will reduce the number of screen taps and bring a more refined experience to such apps.
The use of fragments should allow developers to worry less about smartphone screen sizes and resolutions, something that’s been problematic in the past, because these UI parts are size and resolution independent. Google says these fragments will allow developers to adapt the user experience to different screen sizes, saying developers “might include multiple fragments in an activity only when the screen size is sufficiently large, and, when it is not, launch separate activities that use different fragments.” The screen size issue gains a programmatic solution with more flexibility for devs.
One of the common complaints of Android is how the user interface just isn’t fluid or polished as you might find on a device running Apple’s iOS or even Microsoft’s new Windows Phone 7 handsets. And even though I use Android as my primary mobile platform, I admit there’s validity to that observation. With the new Fragments API, however, I think Google is enabling developers to make a change for the better. Now that they have another UI improvement tool at their disposal, I’m looking forward to seeing just how third-party programmers will take advantage of it on Android smartphones and small tablets.
Related content from GigaOM Pro (sub req’d):