📦 Enable the RecyclerView to support loading more and customizing the footer view without modifying the original adapter of the RecyclerView. 在不改动 RecyclerView 原有的 adapter 的情况下,使 RecyclerView 滑动到底部的时候能够加载更多和自定义底部视图。
APACHE-2.0 License
Published by nukc about 4 years ago
add function: setNotShowFooterWhenNotCoveredScreen #25
Published by nukc over 4 years ago
update canScroll(), fix canScrollVertically(-1) is always false
Published by nukc almost 6 years ago
refactor: sync hasStableIds
Published by nukc almost 6 years ago
feat: func setHasStableIds and setOnStableIdCallback
Published by nukc about 6 years ago
update gradle
compileSdkVersion: 28
buildToolsVersion '28.0.3'
targetSdkVersion 28
supportLibVersion = '28.0.0'
Published by nukc almost 7 years ago
support show load failed view and can retry click to load more
Published by nukc almost 7 years ago
make NoMoreHolder and FooterHolder public
Published by nukc over 7 years ago
add getFooterView() and getNoMoreView()
Published by nukc over 7 years ago
override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position, List payloads)
Published by nukc over 7 years ago
auto load more when no data is initialized
Published by nukc over 7 years ago
fix: use notifyItemRangeRemoved after clear item, can throw java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position
fix: recyclerView will auto scroll to bottom when use onItemRangeInserted(0, count) after clear item
Published by nukc almost 8 years ago
支持设置是否显示没有更多视图,可自定义。
注意:当加载完全部后且已 setLoadMoreEnabled(false),但如果由于生命周期或其他问题而导致 View 重建,mLoadMoreEnabled 依然为 true。
这时候应该需要保存 mLoadMoreEnabled 的状态,如果是 ViewPager + Fragment,可以使用 setOffscreenPageLimit 进行解决。
Published by nukc almost 8 years ago
新增方法:获取原来的adapter,Merge pull request #1
Published by nukc about 8 years ago
增加在onBindViewHolder()触发loadmore的条件
Published by nukc about 8 years ago
修复上个版本可能带来的bug
Published by nukc about 8 years ago
修复当notifyItemInserted(0)的时候RV不会添加item的情况;
修改部分逻辑。
Published by nukc about 8 years ago
支持当item未铺满屏幕的时候仍能够加载更多