The SwipeRefreshLayout Is Now Available In Android Support Library

It was last April when Android finally released a widget that users can finally use to make their apps look the same as those pull to refresh features in apps like GMail. Check out the support library with version 19.1.

I only found out about this the following month. Even so, it was a long time coming. I had been waiting for this componen to be made available by Google. My previous implementation was the traditional pull to refresh feature with an up and down arrow visual when users swipe on a list to update its list.

Without further complicated explanati0ns, here is how to use the SwipeRefreshLayout.

To make your list refresh when user scrolls to the top, do this:

You might also check out the method setColorScheme() wherein this method enables you to set a group of colors that will represent the refresh colors. You can mix in a set of 4 different colors.

Pretty easy, right? Now all your apps will now be consistent with other Google related apps when it comes to updating new content.

Related Posts Plugin for WordPress, Blogger...

Leave a Reply

Your email address will not be published. Required fields are marked *