NoPaginate
NoPaginate copied to clipboard
forget to calculate loadmore item count
when I add code in your MianActivity
like :
@Override
protected void onPostCreate(@Nullable Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
new Handler().postDelayed(() -> mainActivityPresenter.addItems(), 500);
}
notice,it‘s a async action,now recyclerview only have one child(loadmore item), so it will cause load more twice,becase your code didn't calculcate loadmore item count(1)
Hi @HelloVass thank you for this issue and sorry for late answer.
Yes, I have made a mistake in sample. Will fix it, thank you.
For this situation, it is very important to don't forget call a method showLoading(true);
It's block method onLoadMore();
, until you call showLoading(false);
@NoNews thanks for your response,I have refacrored your NoPaginate with kotlin.I hope you don't mind.If you are interested, here is the link.I use it for my project,and it solved my problem,thanks again.
@HelloVass Sure, I don't mind. I also thinking about Kotlin, your repo will be very useful, thank you!