CymChad / CymChad/BaseRecyclerViewAdapterHelper
概率性出现loadMoreView未隐藏消失
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 24.6k
- Forks
- 5.2k
- PR merge metrics
- No merged PRs in 30d
Description
BaseRecyclerViewAdapterHelper 版本2.9.50
使用方式:
采用的是ViewPager2实现抖音短视频效果
加载更多
adapter.setOnLoadMoreListener(() -> {
viewModel.isRefresh = false;
viewModel.isLoadMore = true;
viewModel.getVLogFromType();
}, mViewPagerImpl);
接口数据回调处理
if (data.size() < viewModel.PAGE_SIZE) {
tiktokAdapter.loadMoreEnd(true);
refreshLayout.finishLoadMoreWithNoMoreData();
} else {
tiktokAdapter.loadMoreComplete();
refreshLayout.finishLoadMore();
}
使用了预加载功能
adapter.setPreLoadNumber(2);
viewpager2 item的View必须是machParent 所以自定义了loadmoreView
adapter.setLoadMoreView(new VideoLoadMoreView());
偶现的问题就是在没有更多数据时,最后一条展示全屏的loadMoreView无法消失
望解答
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the load-more handling in BaseRecyclerViewAdapterHelper 2.9.50 and reproduce the issue using ViewPager2, preload number 2, and the custom VideoLoadMoreView. Check the no-more-data callback path and verify that the full-screen loadMoreView reliably disappears after the final item is shown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100