Pull to refresh for GridView in Android
Asked Answered
B

2

6

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.

Bertram answered 28/5, 2012 at 10:23 Comment(3)
why dont you go for this example?Disunion
@FasteKerinns that's Chris Banes library. Isn't it. I have mentioned it in my Q. That single file depend on another 4 JAVA files and the other issue is, it is difficult to add another form widgets to the Activity. Anyway, thanks for the reply :-)Bertram
did u find the solution I am also facing same problemCrayfish
K
2

This is what your looking for

enter image description here

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

Kent answered 1/6, 2012 at 11:30 Comment(1)
Thanks for the reply. But you haven't read my question clearly. I mentioned that I have used this library and etc...Bertram
M
0

GridView doesn't support HeaderView. But Google implemented their own GridView, they use it only for internal purposes. This can solve your problem HeaderView

Makeyevka answered 27/11, 2014 at 7:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.