Domanda

I wanna implement a load more pagination in android for my listview with JSON Parser. I got one tutorial but its with XML parser from here.

http://www.androidhive.info/2012/03/android-listview-with-load-more-button/

Any ideas how to do that with JSON

È stato utile?

Soluzione

Url: /list?page=1

The first time: you execute above URL. If there is no item more, you should disable your button "Load More" else, you show button "Load More" and when user clicks to Button "Load More", you will execute url with page=2, ...

After execute, you should add items to your ListView Adapter and call notifyDataSetChange()

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top