I have looked at lots of implementations of endless lists. One of them is https://github.com/commonsguy/cwac-endless
All of them are using listviews. And all of them are simply adding another row to the list. But when we consider Gridview (like in Google Play Store) and add the loading view as another item in the grid, it looks ugly. How can I achive the same thing in the Play Store?
use a relative layout like this and handle the visiblity in onscroll listener
>
Well, to literally use the same technique as is used in
EndlessAdapter
, you might add N items to the grid, where N is your number of columns.Another approach is to detect when the user has scrolled near the bottom, then kick off the background work to load in more stuff. I don't have a link handy, but what I've seen uses an
OnScrollListener
to detect your scroll position as it changes.i have write a scroll listener and set this scroll listener to my grid view . please correct me if found error.
EG:
/////////////////////////////////////////////////////////////////////////