Hi!! 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.
*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 🙂