Mike Szczys · May 30, 2013 at 10:30 pm

Doing More with the ActionBar

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.

[via Reddit]


_________
Want something on the XDA Portal? Send us a tip!

Mike Szczys

szczys is an editor on XDA-Developers, the largest community for Android users. Mike Szczys is a professional musician but spends all his free time working with hobby electronics. As Contributing Editor for Hackaday.com he became interested in Android as some of the early hardware hacks started popping up on the Internet. What followed was a gradually rising addiction to all things Android. View szczys's posts and articles here.
Mario Tomás Serrafero · May 26, 2015 at 05:42 pm · 2 comments

Nexus & Cookies: A More Focused Direction?

It is that time of the year again, and we are approaching the day where Android fans all over the world gather to watch the livestream of Google’s I/O conference. Among the expected announcements lay wearables, Android Auto, hints at VR and  the Internet of Things and, of course, a new version of Android. An early glimpse of a supposed “Android M” was caught on the official website before being nuked out of existence, and thus the speculation began.  ...

XDA NEWS
Faiz Malkani · May 26, 2015 at 03:32 pm · 3 comments

LG G4 US Carrier Release Dates

The LG G4 was announced on April 29th with its Snapdragon 808 SoC, a welcomed change from its higher-end cousin, the overheating 810. Packing 3GB of RAM, 32GB of storage, a 3000mAh battery, and an impressive 16MP camera, the G4 is widely considered to be one of the best flagships of 2015. After almost a month of release speculation, the major US carriers have finally released some information regarding the device's availability, and here's what we know so far:  ...

XDA NEWS
Faiz Malkani · May 26, 2015 at 02:59 pm · 2 comments

Microsoft Reaches Pre-Install Agreement With New OEMs

As of late, Microsoft has been making a subtle but widespread play into the Android ecosystem, with small apps like Bing Torque being the foreshadowing of the larger ones to come, and as it stands, Skype and the three popular office apps - Powerpoint, Excel and Word - are thriving on the Play Store following their public release earlier this year, prior to which the Office suite remained in beta. Having its top apps on Android was just a stepping stone...

XDA NEWS
Share This