Pull to update GridView on Android

First of all, I want to tell you guys that I read and succeeded in developing Pull for updating using the Chris Banes library and Johan Nilsson Library .

Now I'm trying to go with the Johan Nilsson library for GridView. It is implemented only for ListView, so I need to modify the PullToRefreshListView JAVA file.

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

I am going with the Johan Nilsson library because it gives me the opportunity to add some more form widgets to my activity and it’s easy to customize the design rather than another library.

+6
source share
2 answers

This is what you are looking for.

enter image description here

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

+2
source

GridView does not support HeaderView. But Google implemented its own GridView, it uses it only for internal purposes. This may solve your HeaderView problem .

0
source

Source: https://habr.com/ru/post/916832/


All Articles