I'm quite new to android and I'm exploring the sample code on google website. The code I'm on currently is the SwipeRefreshLayout: http://developer.android.com/samples/SwipeRefreshLayoutBasic/index.html
In the code, we see the SwipeRefreshLayout being executed for a listview, so in other words, if you drag down the list view, the method is triggered and the listview refreshes itself.
You can't change the animation.
SwipeRefreshLayout you can't customize much; I believe this is an attempt of Google to get developers stick to common patterns. What you can style are the four colors of the animation, specified with
SwipeRefreshLayout takes care to show its predefined animation at its top for you. This can be when
canChildScrollUp() returns false and user 'pulls down', or when you set
setRefreshing(true). Turn off the animation with
setRefreshing(false). Put your logic in the method
onRefreshing() of the listener. Override
canChildScrollUp() if you put something that is not a
ListView in your
SwipeRefreshLayout. You should be good to go from here.