June 13, 2013 By: Will Verduzco
When Google released Honeycomb several years ago, much changed in the Android UI world. One of the key emergences was the Action Bar, which has now seen widespread adoption thanks to the spread of devices running 3.0 or later.
The Action Bar, as its name implies, helps modernize the interface dramatically by identifying the application and where the user is within the app, as well as giving the user navigation options when necessary. Unfortunately, however, those running versions of Android older than 3.0 are not able to make use of this UI feature and are otherwise left in the cold.
Thankfully, this is where XDA Recognized Contributor QuantumFoam comes in. He has written a guide that shows developers how to implement the Action Bar on devices running older OS versions. The guide consists of 11 easy-to-follow steps, complete with screenshots to help make the process as painless as possible. So what’s the magic behind the wizardry? Well, that comes from a library by Jake Wharton called ActionBarSherlock.
Want to get in on the Action Bar action? If so, head over to the guide thread and get some learning in! If you wish to learn more about the Action Bar itself, including appropriate uses, visit its Android Developers page.
I love the look and functionality of the ActionBar. I find my thumb has more dexterity at the top of the screen than it does at the bottom when I’m holding my phone with one hand. And so I’m happy to see that the interface is evolving while retaining that valued real estate. Play Music is one app that show off that evolution. The app allows you to see the background at the top of the page, but then fades the ActionBar background color in as you scroll down the page, becoming opaque after you’ve scrolled past the Artist artwork. This image shows that. No, I don’t have any artist artwork, but you can see that the Action bar is clear to start, then becomes orange as I scroll down. It’s a pretty neat animation trick which you can use in your own apps.
Cyril Mottier wrote a guide back in November that shows how you can animate the ActionBar. In his demonstration he makes the background fade through several ranges of color (see the video below). Once you know how it’s done, you can make it do a lot more. Play Music is simply mating the alpha with the scroll location, which I would assume is very easy on the processor. Cyril saw this demonstrated at IOIO and wrote a follow-up article that augments his earlier explanation. But I also like the idea from a comment in the November article mentioning it would be technically possible to turn the ActionBar into a progress indicator. I suppose this could be as easy as resizing a bounding box to match a percentage, but I’ll let you work out all the details.