Most of the articles I found online used setLimit function to load more items. But it is not an efficient way as we would be recalling the existing objects.
I\'m usi
Finally I solved it by using setSkip function.
Code:
private int limit =0;
private boolean loadMore = false;
ParseQuery<ParseObject> query = ParseQuery.getQuery("ClassName");
if(loadMore==true)
{
query.setSkip(limit);
query.setLimit(12);
}
else
{
query.setLimit(12);
}
query.findInBackground(new FindCallback<ParseObject>()
{
@Override
public void done(List<ParseObject> arg0, ParseException arg1)
{
limit = limit+ arg0.size();
if(arg0.size()==0)
{
loadMore = false;
}
else
{
loadMore = true;
}
});