Skip to content

Commit 3ca3f39

Browse files
committed
2 parents 75a784c + a07fa14 commit 3ca3f39

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ kotlin demo :[BRVAH_kotlin](https://github.com/AllenCoder/BRVAH_kotlin)
99
# Document
1010
- [English](https://github.com/CymChad/BaseRecyclerViewAdapterHelper/wiki)
1111
- [中文](http://www.jianshu.com/p/b343fcff51b0)
12-
- [MultipleItemRvAdapter(多布局改进)](https://www.jianshu.com/p/a6cd8859c9fa)
1312

1413
## [UI](https://github.com/CymChad/BaseRecyclerViewAdapterHelper/issues/694)
1514
## Demo

library/src/main/java/com/chad/library/adapter/base/BaseQuickAdapter.java

+8-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ public void disableLoadMoreIfNotFullPage(RecyclerView recyclerView) {
217217
recyclerView.postDelayed(new Runnable() {
218218
@Override
219219
public void run() {
220-
if ((linearLayoutManager.findLastCompletelyVisibleItemPosition() + 1) != getItemCount()) {
220+
if (isFullScreen(linearLayoutManager)) {
221221
setEnableLoadMore(true);
222222
}
223223
}
@@ -238,6 +238,11 @@ public void run() {
238238
}
239239
}
240240

241+
private boolean isFullScreen(LinearLayoutManager llm) {
242+
return (llm.findLastCompletelyVisibleItemPosition() + 1) != getItemCount() ||
243+
llm.findFirstCompletelyVisibleItemPosition() != 0;
244+
}
245+
241246
private int getTheBiggestNumber(int[] numbers) {
242247
int tmp = -1;
243248
if (numbers == null || numbers.length == 0) {
@@ -976,6 +981,7 @@ public boolean onLongClick(View v) {
976981

977982
/**
978983
* override this method if you want to override click event logic
984+
*
979985
* @param v
980986
* @param position
981987
*/
@@ -985,6 +991,7 @@ public void setOnItemClick(View v, int position) {
985991

986992
/**
987993
* override this method if you want to override longClick event logic
994+
*
988995
* @param v
989996
* @param position
990997
* @return

0 commit comments

Comments
 (0)