I always wondered how the pull to refresh feature worked but never actually got around to experimenting with it. Finally getting around to it, I was honestly a little underwhelmed seeing how easy it was to implement the feature. Android Support Library to the rescue.
Most of the heavy lifting is taken care of by SwipeRefreshLayout in the support library. It can be declared in the layout file using the following declaration :
<android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/swiperefresh" android:layout_width="match_parent" android:layout_height="match_parent"> . . .