Reputation: 3925
I am want to add cells to GridView
dynamically when the user reach the last row of cells its like the show more?
Upvotes: 2
Views: 1529
Reputation: 25584
Check out CommonsWare EndlessAdapter. Very straight-forward Adapter
implementation.
You could also manually use an OnScrollListener
on the GridView
. Use the onScrollStateChanged()
callback to figure out when the grid is OnScrollListener.SCROLL_STATE_IDLE
, then determine if the last grid item is visible. If so, get more items for your Adapter
, and call notifyDataSetChanged()
.
Upvotes: 3