Gmail like pull to refresh

Hey  All Here is our new library which has gmail like refresh functionality.

It’s a simple & fully customizable library  which you can use  in your app easily

You can download library & sample project from github.

gmail like pull to refresh

gmail like pull to refresh

*Steps for usage.

1] Here is the code snippet


CustomView view = new CustomView(getApplicationContext(), actionBar);

setContentView(view);

view.setRefreshListner(SampleForGmailLIkePullToRefresh.this);

view.setActionBar(SampleForGmailLIkePullToRefresh.this);

view.getListView().setAdapter(new DummyAdapter(this)); //set adapter to list.

You can implement IRefreshListner interface which has two methods preRefresh() postRefresh() which will be invoked when loading starts and stops respectively.

You can use these methods to write logic which will be executed before and after refreshing.

Little more about CustomView class

We have exposed following  useful methods of CustomView class.

  • startLoading()  to start refreshing/loading explicitly.
  • stopLoading()  to stop refreshing/loading explicitly.
  • getListView()  this will return listview.

Its an Apache License, Version 2.0 library so you can use it in your apps the way you want. Let us know in case of any issues. Download this library from  github.

Happy Coding Happy Learning 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s