7 Comments

Summary:

The first bits of Honeycomb are now starting to filter down into Android smartphones, in the form of Fragments. Here’s what these smart panes can do and why you’ll want programmers to start using them for Android apps on smartphones of every size.

gmail-fragment-featured

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):

You’re subscribed! If you like, you can update your settings

  1. This will also increase the “porting” of Android “phone apps” to tablets. In other words, Android apps won’t need to be tablet or phone specific at all. With Android’s built in scaling with fragments a well designed Android app will take into account that the app may run on a 3″ screen or a 50″ screen and use the space intelligently.

    Android fragments reducing Android app fragmentation lol

    1. Good point and that will be a welcome change because the stretched phone apps on the Xoom look a little comical. Your point about a 50″ screen is spot-on too: Google TV apps, anyone? ;)

      1. Fragments does seem to address screen size and resolution differences. My experience in managing j2me development was that processor power significantly determined the ability to render images effectively.

        I believe the very openness of the android system will inevitably lead to device fragmentation. This can be managed effectively and profitably by developers but this will mean the android experience will significantly across devices.

    2. > Android fragments reducing Android app fragmentation lol

      Exactly. Nip platform fragmentation in the bud by using adaptive, flexible components.:

      http://android-developers.blogspot.com/2011/03/fragments-for-all.html

      What I’d like to see is more attention paid to sanding the rough edges in Android’s UX, regardless of whether this means tweaking the base code or just some APIs. Even on top-line handsets, you can still see the occasional glitch that can drive users mad: kinetic scrolling has fits of jerkiness, screen swipes get the hiccups, and the UI spins it’s wheels while populating a long list of icons (try it for yourself; Settings > Applications > Manage Applications).

      1. The Manage Applications UI is much smoother in Gingerbread. In this case the implementation of that specific UI was bad, doing long work on the main thread that caused the glitches.

  2. NotoriousMon Friday, March 4, 2011

    maybe Google is hoping now that when anyone “Googles” “Android fragmentation” this clever idea will pop up to the top of the results instead of the “other” kind of fragmentation everybody has been talking about the last couple years.

    slick…

  3. Asheley Forrester Saturday, March 5, 2011

    Android now is not just a talk of the town but also a hot topic around the world. People are swooning over this product. All Google needs to do is solve these problems in a way that it does not give it’s users a second chance to complain.

Comments have been disabled for this post