File tree 2 files changed +8
-2
lines changed
library/src/main/java/com/chad/library/adapter/base
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ kotlin demo :[BRVAH_kotlin](https://github.com/AllenCoder/BRVAH_kotlin)
9
9
# Document
10
10
- [ English] ( https://github.com/CymChad/BaseRecyclerViewAdapterHelper/wiki )
11
11
- [ 中文] ( http://www.jianshu.com/p/b343fcff51b0 )
12
- - [ MultipleItemRvAdapter(多布局改进)] ( https://www.jianshu.com/p/a6cd8859c9fa )
13
12
14
13
## [ UI] ( https://github.com/CymChad/BaseRecyclerViewAdapterHelper/issues/694 )
15
14
## Demo
Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ public void disableLoadMoreIfNotFullPage(RecyclerView recyclerView) {
217
217
recyclerView .postDelayed (new Runnable () {
218
218
@ Override
219
219
public void run () {
220
- if ((linearLayoutManager . findLastCompletelyVisibleItemPosition () + 1 ) != getItemCount ( )) {
220
+ if (isFullScreen (linearLayoutManager )) {
221
221
setEnableLoadMore (true );
222
222
}
223
223
}
@@ -238,6 +238,11 @@ public void run() {
238
238
}
239
239
}
240
240
241
+ private boolean isFullScreen (LinearLayoutManager llm ) {
242
+ return (llm .findLastCompletelyVisibleItemPosition () + 1 ) != getItemCount () ||
243
+ llm .findFirstCompletelyVisibleItemPosition () != 0 ;
244
+ }
245
+
241
246
private int getTheBiggestNumber (int [] numbers ) {
242
247
int tmp = -1 ;
243
248
if (numbers == null || numbers .length == 0 ) {
@@ -976,6 +981,7 @@ public boolean onLongClick(View v) {
976
981
977
982
/**
978
983
* override this method if you want to override click event logic
984
+ *
979
985
* @param v
980
986
* @param position
981
987
*/
@@ -985,6 +991,7 @@ public void setOnItemClick(View v, int position) {
985
991
986
992
/**
987
993
* override this method if you want to override longClick event logic
994
+ *
988
995
* @param v
989
996
* @param position
990
997
* @return
You can’t perform that action at this time.
0 commit comments