In the most recent update to Android Design, we added a section to the Progress & Activity page called "Custom indicators" [1]. The guide describes an example from the various Google Play properties:

"...we wanted the current download state of each item to be visible at all times at the top-level screen. We also needed to indicate progress from one download state to another, because downloading is not instantaneous.

...we designed a custom indicator that could show all of the information in a tiny footprint, with the flexibility to appear on top of content if necessary. The color indicates whether it's downloaded (blue) or not (gray). The appearance of the pin indicates whether the download is permanent (white, upright) or temporary (gray, diagonal). And when state is in the process of changing, progress is indicated by a moving pie chart."

I think this is quite a clever solution to a fairly common problem (allowing users to choose content to store offline and providing visual feedback about download progress), so I decided to throw together some sample code for it:


Now, a quick word of caution: consider whether this is really necessary for your app before using it! Ideally, all your content should be available offline, and it should download fast enough that showing progress would be superfluous. That said, if your content make take some time to download and you can't come up with an awesome, automagical smart-offlining scheme, then this may be an appropriate UI element.


[1] http://developer.android.com/design/building-blocks/progress.html#custom-indicators
Shared publiclyView activity