Google release the new Gmail app with an alternate way to handle pull down to refresh.
Instead of showing the started hidden row that is pulled down. Gmail displays an animated message overtop of the action bar.
The message includes an animated horizontal line.
Is this a standard feature of the Android SDK? I can't find anything in the action bar API that would do this.
To add the swipe to refresh widget to an existing app, add SwipeRefreshLayout as the parent of a single ListView or GridView . Remember that SwipeRefreshLayout only supports a single ListView or GridView child. You can also use the SwipeRefreshLayout widget with a ListFragment .
To disable the gesture and progress animation, call setEnabled(false) on the view. This layout should be made the parent of the view that will be refreshed as a result of the gesture and can only support one direct child.
Android SwipeRefreshLayout is a ViewGroup that can hold only one scrollable child. It can be either a ScrollView, ListView or RecyclerView. The basic need for a SwipeRefreshLayout is to allow the users to refresh the screen manually.
According to a helpful volunteer support person, one of the "Labs" you can enable in Gmail is what's causing some people to see a blue icon. Labs are experimental custom features that you can tweak to change the way your mail looks or works. The one that's causing the blue icon is the "Unread message icon" Lab.
Google has released support for this directly in the SDK. I am not sure of what version you need to support (that may be an issue).
Check out the official SDK feature info here: http://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout.html
If you are able to use the SDK one, you will be better off, even Chris Banes wrote a post, suggesting the same.
Chris Banes' ActionBar-PullToRefresh library on GitHub probably offers pull-to-refresh functionality closest to GMail app.
See also: Juhani Lehtimäki's analysis of GMail pull-to-refresh.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With