Skip to content

Commit 5b52abe

Browse files
committed
fix: QuickGridLayoutManager空布局无法撑满 #3818
1 parent b57c295 commit 5b52abe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

library/src/main/java/com/chad/library/adapter4/BaseQuickAdapter.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,14 +401,14 @@ abstract class BaseQuickAdapter<T : Any, VH : RecyclerView.ViewHolder>(
401401

402402

403403
/**
404-
* Is full span item (Only StaggeredGridLayoutManager)
405-
* 是否是完整跨度的item(仅限于 StaggeredGridLayoutManager)
404+
* Is full span item
405+
* 是否是完整跨度的item
406406
*
407407
* @param itemType
408408
* @return
409409
*/
410410
open fun isFullSpanItem(itemType: Int): Boolean {
411-
return false
411+
return itemType == EMPTY_VIEW
412412
}
413413

414414
/**
@@ -822,7 +822,7 @@ abstract class BaseQuickAdapter<T : Any, VH : RecyclerView.ViewHolder>(
822822

823823

824824
companion object {
825-
const val EMPTY_VIEW = 0x10000555
825+
const val EMPTY_VIEW = 0x01000555
826826

827827
internal const val EMPTY_PAYLOAD = 0
828828
}

0 commit comments

Comments
 (0)