Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pull to refresh for GridView in Android

First of all, I want to tell you guys I have read and succeed developing Pull to refresh using Chris Banes library and Johan Nilsson library .

Now I'm trying to go with Johan Nilsson library for GridView. He only implemented for ListView so I have to modify PullToRefreshListView JAVA file.

There I have extends GridView instead of ListView (Line 24). Then it will give me a error on Line 109 by saying addHeaderView(mRefreshView); is not recognized and change it as addView() But addView() methods also give me run time errors.

I am going with Johan Nilsson library, because it gives me the opportunity to add some more form widgets to my Activity and easily customize the design rather than the other library.

like image 312
AnujAroshA Avatar asked May 28 '12 10:05

AnujAroshA


1 Answers

This is what your looking for

enter image description here

Works for all AbsListView. I've implemented both ListView and GridView.

like image 72
Daniel Magnusson Avatar answered Sep 28 '22 15:09

Daniel Magnusson