Every few months, Google experiments with a new design, widget, or pattern by injecting it into one of its most important apps. Preceding I/O 2013, we were treated to a steady stream of updates including the new Navigation Drawer. As we have seen, the latest GMail app joined the herd, but also gained a tweaked version of the now common pull-to-refresh gesture. While Google was kind enough to supply us with a library for the Navigation Drawer, anybody hoping to add the newly-stylized refresh is left to fend for themselves. Fortunately, the developer community is filled with people who can’t wait for El Goog to get caught up. Among the generous developers open sourcing their code, Chris Banes brings his own implementation of the new pull-to-refresh.
If you would like to see it in action, start by grabbing the sample app here. The library works with Honeycomb (API Level 11) and above, but Chris intends to add compatibility for ActionBarSherlock and ActionBarCompat to reach earlier versions of Android. There are also plans to extend and improve on customization options like header styles and drawable animations. While the sample demonstrates two different pull animations, a text percentage and a line that stretches from left-to-right, there is not yet an exact copy of GMail’s, which stretches from the center outward. That is also on the to-do list.
Chris is careful to point out that this is still a preview and changes to the API should be expected. If you would like to give it a shot and add a little different flare to your app, check out the code and instructions on the Github page.
DownloadGithub
Android ActionBar-PullToRefresh Source Code
Via : OpenAndroid
0 comments:
Post a Comment