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. View posts and articles below.

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.
GermainZ · Mar 6, 2015 at 10:34 am · no comments

Open, Accessible Material Design Icons

Need some material design icons for your latest app or website? Or perhaps you're a designer looking to share some of your work? Material Design Icons probably has what you're looking for. For developers, it means open, searchable icons that are available in all the formats you could wish for. Developing for Android? You can download any icon in two formats: Android 5.x (gives you a vector drawable along with PNGs in black, gray and the color of your choosing),...

XDA NEWS
Jimmy McGee · Mar 6, 2015 at 06:00 am · no comments

LG G4 Confirmed, New Blackphone 2 & More – XDA TV

Nvidia unveiled the SHIELD Tegra X1 TV Box! That and much more news is covered by Jordan when he reviews all the important stories from this week. Included in this week's news is the announcement of the Cyanogen's new corporate identity and partnership with Qualcomm and be sure to check out the article talking about Lollipop devices being no longer encrypted by default! That's not all that's covered in today's video! Jordan talks about the other videos released this week...

XDA NEWS
GermainZ · Mar 5, 2015 at 01:50 pm · 2 comments

HTC to Replace Swype with TouchPal

According to engadget (citing TouchPal as well as an internal source), HTC aims to replace Swype with TouchPal as the default input method in upcoming devices, including the new HTC One M9. The official TouchPal Twitter account also tweeted the engadget article about this, further confirming the move. What prompted this move? The CEO of CooTek, the company behind TouchPal, says it's because of their better contextual prediction and language support. If you actually look at the supported languages, you'll...

XDA NEWS
Share This