Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_40328769
BaseRecyclerViewAdapterHelper
提交
49a29ebf
B
BaseRecyclerViewAdapterHelper
项目概览
qq_40328769
/
BaseRecyclerViewAdapterHelper
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
B
BaseRecyclerViewAdapterHelper
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
49a29ebf
编写于
1月 06, 2020
作者:
limuyang2
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Change method to property
上级
dedd9982
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
103 addition
and
87 deletion
+103
-87
library/build.gradle
library/build.gradle
+1
-1
library/src/main/java/com/chad/library/adapter/base/BaseNodeAdapter.kt
...ain/java/com/chad/library/adapter/base/BaseNodeAdapter.kt
+7
-7
library/src/main/java/com/chad/library/adapter/base/BaseProviderMultiAdapter.kt
...com/chad/library/adapter/base/BaseProviderMultiAdapter.kt
+4
-4
library/src/main/java/com/chad/library/adapter/base/BaseQuickAdapter.kt
...in/java/com/chad/library/adapter/base/BaseQuickAdapter.kt
+83
-67
library/src/main/java/com/chad/library/adapter/base/BaseSectionQuickAdapter.kt
.../com/chad/library/adapter/base/BaseSectionQuickAdapter.kt
+2
-2
library/src/main/java/com/chad/library/adapter/base/diff/BrvahListUpdateCallback.kt
...chad/library/adapter/base/diff/BrvahListUpdateCallback.kt
+4
-4
library/src/main/java/com/chad/library/adapter/base/module/DraggableModule.kt
...a/com/chad/library/adapter/base/module/DraggableModule.kt
+1
-1
library/src/main/java/com/chad/library/adapter/base/module/LoadMoreModule.kt
...va/com/chad/library/adapter/base/module/LoadMoreModule.kt
+1
-1
未找到文件。
library/build.gradle
浏览文件 @
49a29ebf
apply
plugin:
'com.android.library'
apply
plugin:
'kotlin-android'
apply
plugin:
'kotlin-android-extensions'
apply
plugin:
'kotlin-kapt'
//
apply plugin: 'kotlin-kapt'
android
{
compileSdkVersion
28
...
...
library/src/main/java/com/chad/library/adapter/base/BaseNodeAdapter.kt
浏览文件 @
49a29ebf
...
...
@@ -113,7 +113,7 @@ abstract class BaseNodeAdapter(nodeList: MutableList<BaseNode>? = null)
*/
override
fun
remove
(
position
:
Int
)
{
val
removeCount
=
removeAt
(
position
)
notifyItemRangeRemoved
(
position
+
getHeaderLayoutCount
()
,
removeCount
)
notifyItemRangeRemoved
(
position
+
headerLayoutCount
,
removeCount
)
compatibilityDataSizeChanged
(
0
)
}
...
...
@@ -130,10 +130,10 @@ abstract class BaseNodeAdapter(nodeList: MutableList<BaseNode>? = null)
this
.
data
.
addAll
(
index
,
newFlatData
)
if
(
removeCount
==
newFlatData
.
size
)
{
notifyItemRangeChanged
(
index
+
getHeaderLayoutCount
()
,
removeCount
)
notifyItemRangeChanged
(
index
+
headerLayoutCount
,
removeCount
)
}
else
{
notifyItemRangeRemoved
(
index
+
getHeaderLayoutCount
()
,
removeCount
)
notifyItemRangeInserted
(
index
+
getHeaderLayoutCount
()
,
newFlatData
.
size
)
notifyItemRangeRemoved
(
index
+
headerLayoutCount
,
removeCount
)
notifyItemRangeInserted
(
index
+
headerLayoutCount
,
newFlatData
.
size
)
// notifyItemRangeChanged(index + getHeaderLayoutCount(), max(removeCount, newFlatData.size)
}
...
...
@@ -381,7 +381,7 @@ abstract class BaseNodeAdapter(nodeList: MutableList<BaseNode>? = null)
val
newFlatData
=
flatData
(
newData
)
this
.
data
.
addAll
(
parentIndex
+
1
,
newFlatData
)
val
positionStart
=
parentIndex
+
1
+
getHeaderLayoutCount
()
val
positionStart
=
parentIndex
+
1
+
headerLayoutCount
if
(
removeCount
==
newFlatData
.
size
)
{
notifyItemRangeChanged
(
positionStart
,
removeCount
)
}
else
{
...
...
@@ -453,7 +453,7 @@ abstract class BaseNodeAdapter(nodeList: MutableList<BaseNode>? = null)
val
node
=
this
.
data
[
position
]
if
(
node
is
BaseExpandNode
&&
node
.
isExpanded
)
{
val
adapterPosition
=
position
+
getHeaderLayoutCount
()
val
adapterPosition
=
position
+
headerLayoutCount
node
.
isExpanded
=
false
if
(
node
.
childNode
.
isNullOrEmpty
())
{
...
...
@@ -493,7 +493,7 @@ abstract class BaseNodeAdapter(nodeList: MutableList<BaseNode>? = null)
val
node
=
this
.
data
[
position
]
if
(
node
is
BaseExpandNode
&&
!
node
.
isExpanded
)
{
val
adapterPosition
=
position
+
getHeaderLayoutCount
()
val
adapterPosition
=
position
+
headerLayoutCount
node
.
isExpanded
=
true
if
(
node
.
childNode
.
isNullOrEmpty
())
{
...
...
library/src/main/java/com/chad/library/adapter/base/BaseProviderMultiAdapter.kt
浏览文件 @
49a29ebf
...
...
@@ -76,7 +76,7 @@ abstract class BaseProviderMultiAdapter<T>(data: MutableList<T>? = null) :
if
(
position
==
RecyclerView
.
NO_POSITION
)
{
return
@setOnClickListener
}
position
-=
getHeaderLayoutCount
()
position
-=
headerLayoutCount
val
itemViewType
=
viewHolder
.
itemViewType
val
provider
=
mItemProviders
.
get
(
itemViewType
)
...
...
@@ -92,7 +92,7 @@ abstract class BaseProviderMultiAdapter<T>(data: MutableList<T>? = null) :
if
(
position
==
RecyclerView
.
NO_POSITION
)
{
return
@setOnLongClickListener
false
}
position
-=
getHeaderLayoutCount
()
position
-=
headerLayoutCount
val
itemViewType
=
viewHolder
.
itemViewType
val
provider
=
mItemProviders
.
get
(
itemViewType
)
...
...
@@ -115,7 +115,7 @@ abstract class BaseProviderMultiAdapter<T>(data: MutableList<T>? = null) :
if
(
position
==
RecyclerView
.
NO_POSITION
)
{
return
@setOnClickListener
}
position
-=
getHeaderLayoutCount
()
position
-=
headerLayoutCount
provider
.
onChildClick
(
viewHolder
,
v
,
data
[
position
],
position
)
}
}
...
...
@@ -134,7 +134,7 @@ abstract class BaseProviderMultiAdapter<T>(data: MutableList<T>? = null) :
if
(
position
==
RecyclerView
.
NO_POSITION
)
{
return
@setOnLongClickListener
false
}
position
-=
getHeaderLayoutCount
()
position
-=
headerLayoutCount
provider
.
onChildLongClick
(
viewHolder
,
v
,
data
[
position
],
position
)
}
}
...
...
library/src/main/java/com/chad/library/adapter/base/BaseQuickAdapter.kt
浏览文件 @
49a29ebf
...
...
@@ -273,7 +273,7 @@ abstract class BaseQuickAdapter<T, VH : BaseViewHolder>
}
else
{
0
}
return
getHeaderLayoutCount
()
+
getDefItemCount
()
+
getFooterLayoutCount
()
+
loadMoreCount
return
headerLayoutCount
+
getDefItemCount
()
+
footerLayoutCount
+
loadMoreCount
}
}
...
...
@@ -336,7 +336,7 @@ abstract class BaseQuickAdapter<T, VH : BaseViewHolder>
}
}
HEADER_VIEW
,
EMPTY_VIEW
,
FOOTER_VIEW
->
return
else
->
convert
(
holder
,
data
.
getOrNull
(
position
-
getHeaderLayoutCount
()
))
else
->
convert
(
holder
,
data
.
getOrNull
(
position
-
headerLayoutCount
))
}
}
...
...
@@ -356,7 +356,7 @@ abstract class BaseQuickAdapter<T, VH : BaseViewHolder>
}
}
HEADER_VIEW
,
EMPTY_VIEW
,
FOOTER_VIEW
->
return
else
->
convert
(
holder
,
data
.
getOrNull
(
position
-
getHeaderLayoutCount
()
),
payloads
)
else
->
convert
(
holder
,
data
.
getOrNull
(
position
-
headerLayoutCount
),
payloads
)
}
}
...
...
@@ -405,7 +405,7 @@ abstract class BaseQuickAdapter<T, VH : BaseViewHolder>
if
(
isFixedViewType
(
type
))
manager
.
spanCount
else
mSpanSizeLookup
!!
.
getSpanSize
(
manager
,
type
,
position
-
getHeaderLayoutCount
()
)
mSpanSizeLookup
!!
.
getSpanSize
(
manager
,
type
,
position
-
headerLayoutCount
)
}
}
...
...
@@ -486,7 +486,7 @@ abstract class BaseQuickAdapter<T, VH : BaseViewHolder>
if
(
position
==
RecyclerView
.
NO_POSITION
)
{
return
@setOnClickListener
}
position
-=
getHeaderLayoutCount
()
position
-=
headerLayoutCount
setOnItemClick
(
v
,
position
)
}
}
...
...
@@ -496,7 +496,7 @@ abstract class BaseQuickAdapter<T, VH : BaseViewHolder>
if
(
position
==
RecyclerView
.
NO_POSITION
)
{
return
@setOnLongClickListener
false
}
position
-=
getHeaderLayoutCount
()
position
-=
headerLayoutCount
setOnItemLongClick
(
v
,
position
)
}
}
...
...
@@ -512,7 +512,7 @@ abstract class BaseQuickAdapter<T, VH : BaseViewHolder>
if
(
position
==
RecyclerView
.
NO_POSITION
)
{
return
@setOnClickListener
}
position
-=
getHeaderLayoutCount
()
position
-=
headerLayoutCount
setOnItemChildClick
(
v
,
position
)
}
}
...
...
@@ -529,7 +529,7 @@ abstract class BaseQuickAdapter<T, VH : BaseViewHolder>
if
(
position
==
RecyclerView
.
NO_POSITION
)
{
return
@setOnLongClickListener
false
}
position
-=
getHeaderLayoutCount
()
position
-=
headerLayoutCount
setOnItemChildLongClick
(
v
,
position
)
}
}
...
...
@@ -712,7 +712,7 @@ abstract class BaseQuickAdapter<T, VH : BaseViewHolder>
}
mHeaderLayout
.
addView
(
view
,
mIndex
)
if
(
mHeaderLayout
.
childCount
==
1
)
{
val
position
=
getHeaderViewPosition
()
val
position
=
headerViewPosition
if
(
position
!=
-
1
)
{
notifyItemInserted
(
position
)
}
...
...
@@ -747,7 +747,7 @@ abstract class BaseQuickAdapter<T, VH : BaseViewHolder>
mHeaderLayout
.
removeView
(
header
)
if
(
mHeaderLayout
.
childCount
==
0
)
{
val
position
=
getHeaderViewPosition
()
val
position
=
headerViewPosition
if
(
position
!=
-
1
)
{
notifyItemRemoved
(
position
)
}
...
...
@@ -758,42 +758,49 @@ abstract class BaseQuickAdapter<T, VH : BaseViewHolder>
if
(!
hasHeaderLayout
())
return
mHeaderLayout
.
removeAllViews
()
val
position
=
getHeaderViewPosition
()
val
position
=
headerViewPosition
if
(
position
!=
-
1
)
{
notifyItemRemoved
(
position
)
}
}
fun
getHeaderViewPosition
():
Int
{
if
(
hasEmptyView
())
{
if
(
headerWithEmptyEnable
)
{
val
headerViewPosition
:
Int
get
()
{
if
(
hasEmptyView
())
{
if
(
headerWithEmptyEnable
)
{
return
0
}
}
else
{
return
0
}
}
else
{
return
0
return
-
1
}
return
-
1
}
/**
* if addHeaderView will be return 1, if not will be return 0
*/
fun
getHeaderLayoutCount
():
Int
=
if
(
hasHeaderLayout
())
{
val
headerLayoutCount
:
Int
get
()
{
return
if
(
hasHeaderLayout
())
{
1
}
else
{
0
}
}
/**
* 获取头布局
* @return LinearLayout?
*/
fun
getHeaderLayout
():
LinearLayout
?
=
if
(
this
::
mHeaderLayout
.
isInitialized
)
{
mHeaderLayout
}
else
{
null
}
val
headerLayout
:
LinearLayout
?
get
()
{
return
if
(
this
::
mHeaderLayout
.
isInitialized
)
{
mHeaderLayout
}
else
{
null
}
}
/********************************************************************************************/
/********************************* FooterView Method ****************************************/
...
...
@@ -817,7 +824,7 @@ abstract class BaseQuickAdapter<T, VH : BaseViewHolder>
}
mFooterLayout
.
addView
(
view
,
mIndex
)
if
(
mFooterLayout
.
childCount
==
1
)
{
val
position
=
getFooterViewPosition
()
val
position
=
footerViewPosition
if
(
position
!=
-
1
)
{
notifyItemInserted
(
position
)
}
...
...
@@ -836,19 +843,12 @@ abstract class BaseQuickAdapter<T, VH : BaseViewHolder>
}
}
fun
hasFooterLayout
():
Boolean
{
if
(
this
::
mFooterLayout
.
isInitialized
&&
mFooterLayout
.
childCount
>
0
)
{
return
true
}
return
false
}
fun
removeFooterView
(
footer
:
View
)
{
if
(!
hasFooterLayout
())
return
mFooterLayout
.
removeView
(
footer
)
if
(
mFooterLayout
.
childCount
==
0
)
{
val
position
=
getFooterViewPosition
()
val
position
=
footerViewPosition
if
(
position
!=
-
1
)
{
notifyItemRemoved
(
position
)
}
...
...
@@ -859,47 +859,59 @@ abstract class BaseQuickAdapter<T, VH : BaseViewHolder>
if
(!
hasFooterLayout
())
return
mFooterLayout
.
removeAllViews
()
val
position
=
getFooterViewPosition
()
val
position
=
footerViewPosition
if
(
position
!=
-
1
)
{
notifyItemRemoved
(
position
)
}
}
fun
getFooterViewPosition
():
Int
{
//Return to footer view notify position
if
(
hasEmptyView
())
{
var
position
=
1
if
(
headerWithEmptyEnable
&&
hasHeaderLayout
())
{
position
++
}
if
(
footerWithEmptyEnable
)
{
return
position
}
}
else
{
return
getHeaderLayoutCount
()
+
data
.
size
fun
hasFooterLayout
():
Boolean
{
if
(
this
::
mFooterLayout
.
isInitialized
&&
mFooterLayout
.
childCount
>
0
)
{
return
true
}
return
-
1
return
false
}
val
footerViewPosition
:
Int
get
()
{
if
(
hasEmptyView
())
{
var
position
=
1
if
(
headerWithEmptyEnable
&&
hasHeaderLayout
())
{
position
++
}
if
(
footerWithEmptyEnable
)
{
return
position
}
}
else
{
return
headerLayoutCount
+
data
.
size
}
return
-
1
}
/**
* if addHeaderView will be return 1, if not will be return 0
*/
fun
getFooterLayoutCount
():
Int
=
if
(
hasFooterLayout
())
{
val
footerLayoutCount
:
Int
get
()
{
return
if
(
hasFooterLayout
())
{
1
}
else
{
0
}
}
/**
* 获取脚布局
* @return LinearLayout?
*/
fun
getFooterLayout
():
LinearLayout
?
=
if
(
this
::
mFooterLayout
.
isInitialized
)
{
mFooterLayout
}
else
{
null
}
val
footerLayout
:
LinearLayout
?
get
()
{
return
if
(
this
::
mFooterLayout
.
isInitialized
)
{
mFooterLayout
}
else
{
null
}
}
/********************************************************************************************/
/********************************** EmptyView Method ****************************************/
...
...
@@ -960,11 +972,15 @@ abstract class BaseQuickAdapter<T, VH : BaseViewHolder>
*
* @return The view to show if the adapter is empty.
*/
fun
getEmptyLayout
():
FrameLayout
?
=
if
(
this
::
mEmptyLayout
.
isInitialized
)
{
mEmptyLayout
}
else
{
null
}
val
emptyLayout
:
FrameLayout
?
get
()
{
return
if
(
this
::
mEmptyLayout
.
isInitialized
)
{
mEmptyLayout
}
else
{
null
}
}
/*************************** Animation ******************************************/
...
...
@@ -1046,7 +1062,7 @@ abstract class BaseQuickAdapter<T, VH : BaseViewHolder>
*/
open
fun
addData
(
@IntRange
(
from
=
0
)
position
:
Int
,
data
:
T
)
{
this
.
data
.
add
(
position
,
data
)
notifyItemInserted
(
position
+
getHeaderLayoutCount
()
)
notifyItemInserted
(
position
+
headerLayoutCount
)
compatibilityDataSizeChanged
(
1
)
}
...
...
@@ -1056,7 +1072,7 @@ abstract class BaseQuickAdapter<T, VH : BaseViewHolder>
*/
open
fun
addData
(
@NonNull
data
:
T
)
{
this
.
data
.
add
(
data
)
notifyItemInserted
(
this
.
data
.
size
+
getHeaderLayoutCount
()
)
notifyItemInserted
(
this
.
data
.
size
+
headerLayoutCount
)
compatibilityDataSizeChanged
(
1
)
}
...
...
@@ -1069,13 +1085,13 @@ abstract class BaseQuickAdapter<T, VH : BaseViewHolder>
*/
open
fun
addData
(
@IntRange
(
from
=
0
)
position
:
Int
,
newData
:
Collection
<
T
>)
{
this
.
data
.
addAll
(
position
,
newData
)
notifyItemRangeInserted
(
position
+
getHeaderLayoutCount
()
,
newData
.
size
)
notifyItemRangeInserted
(
position
+
headerLayoutCount
,
newData
.
size
)
compatibilityDataSizeChanged
(
newData
.
size
)
}
open
fun
addData
(
@NonNull
newData
:
Collection
<
T
>)
{
this
.
data
.
addAll
(
newData
)
notifyItemRangeInserted
(
this
.
data
.
size
-
newData
.
size
+
getHeaderLayoutCount
()
,
newData
.
size
)
notifyItemRangeInserted
(
this
.
data
.
size
-
newData
.
size
+
headerLayoutCount
,
newData
.
size
)
compatibilityDataSizeChanged
(
newData
.
size
)
}
...
...
@@ -1090,7 +1106,7 @@ abstract class BaseQuickAdapter<T, VH : BaseViewHolder>
return
}
this
.
data
.
removeAt
(
position
)
val
internalPosition
=
position
+
getHeaderLayoutCount
()
val
internalPosition
=
position
+
headerLayoutCount
notifyItemRemoved
(
internalPosition
)
compatibilityDataSizeChanged
(
0
)
notifyItemRangeChanged
(
internalPosition
,
this
.
data
.
size
-
internalPosition
)
...
...
@@ -1098,7 +1114,7 @@ abstract class BaseQuickAdapter<T, VH : BaseViewHolder>
open
fun
remove
(
data
:
T
)
{
val
index
=
this
.
data
.
indexOf
(
data
)
if
(
index
==
-
1
)
{
if
(
index
==
-
1
)
{
return
}
remove
(
index
)
...
...
@@ -1113,7 +1129,7 @@ abstract class BaseQuickAdapter<T, VH : BaseViewHolder>
return
}
this
.
data
[
index
]
=
data
notifyItemChanged
(
index
+
getHeaderLayoutCount
()
)
notifyItemChanged
(
index
+
headerLayoutCount
)
}
/**
...
...
library/src/main/java/com/chad/library/adapter/base/BaseSectionQuickAdapter.kt
浏览文件 @
49a29ebf
...
...
@@ -66,7 +66,7 @@ abstract class BaseSectionQuickAdapter<T : SectionEntity, VH : BaseViewHolder>
override
fun
onBindViewHolder
(
holder
:
VH
,
position
:
Int
)
{
if
(
holder
.
itemViewType
==
SectionEntity
.
HEADER_TYPE
)
{
// setFullSpan(holder)
convertHeader
(
holder
,
data
.
getOrNull
(
position
-
getHeaderLayoutCount
()
))
convertHeader
(
holder
,
data
.
getOrNull
(
position
-
headerLayoutCount
))
}
else
{
super
.
onBindViewHolder
(
holder
,
position
)
}
...
...
@@ -79,7 +79,7 @@ abstract class BaseSectionQuickAdapter<T : SectionEntity, VH : BaseViewHolder>
}
if
(
holder
.
itemViewType
==
SectionEntity
.
HEADER_TYPE
)
{
convertHeader
(
holder
,
data
.
getOrNull
(
position
-
getHeaderLayoutCount
()
),
payloads
)
convertHeader
(
holder
,
data
.
getOrNull
(
position
-
headerLayoutCount
),
payloads
)
}
else
{
super
.
onBindViewHolder
(
holder
,
position
,
payloads
)
}
...
...
library/src/main/java/com/chad/library/adapter/base/diff/BrvahListUpdateCallback.kt
浏览文件 @
49a29ebf
...
...
@@ -6,19 +6,19 @@ import com.chad.library.adapter.base.BaseQuickAdapter
class
BrvahListUpdateCallback
(
private
val
mAdapter
:
BaseQuickAdapter
<
*
,
*
>)
:
ListUpdateCallback
{
override
fun
onInserted
(
position
:
Int
,
count
:
Int
)
{
mAdapter
.
notifyItemRangeInserted
(
position
+
mAdapter
.
getHeaderLayoutCount
()
,
count
)
mAdapter
.
notifyItemRangeInserted
(
position
+
mAdapter
.
headerLayoutCount
,
count
)
}
override
fun
onRemoved
(
position
:
Int
,
count
:
Int
)
{
mAdapter
.
notifyItemRangeRemoved
(
position
+
mAdapter
.
getHeaderLayoutCount
()
,
count
)
mAdapter
.
notifyItemRangeRemoved
(
position
+
mAdapter
.
headerLayoutCount
,
count
)
}
override
fun
onMoved
(
fromPosition
:
Int
,
toPosition
:
Int
)
{
mAdapter
.
notifyItemMoved
(
fromPosition
+
mAdapter
.
getHeaderLayoutCount
(),
toPosition
+
mAdapter
.
getHeaderLayoutCount
()
)
mAdapter
.
notifyItemMoved
(
fromPosition
+
mAdapter
.
headerLayoutCount
,
toPosition
+
mAdapter
.
headerLayoutCount
)
}
override
fun
onChanged
(
position
:
Int
,
count
:
Int
,
payload
:
Any
?)
{
mAdapter
.
notifyItemRangeChanged
(
position
+
mAdapter
.
getHeaderLayoutCount
()
,
count
,
payload
)
mAdapter
.
notifyItemRangeChanged
(
position
+
mAdapter
.
headerLayoutCount
,
count
,
payload
)
}
}
\ No newline at end of file
library/src/main/java/com/chad/library/adapter/base/module/DraggableModule.kt
浏览文件 @
49a29ebf
...
...
@@ -110,7 +110,7 @@ open class BaseDraggableModule(private val baseQuickAdapter: BaseQuickAdapter<*,
protected
fun
getViewHolderPosition
(
viewHolder
:
RecyclerView
.
ViewHolder
):
Int
{
return
viewHolder
.
adapterPosition
-
baseQuickAdapter
.
getHeaderLayoutCount
()
return
viewHolder
.
adapterPosition
-
baseQuickAdapter
.
headerLayoutCount
}
/************************* Drag *************************/
...
...
library/src/main/java/com/chad/library/adapter/base/module/LoadMoreModule.kt
浏览文件 @
49a29ebf
...
...
@@ -82,7 +82,7 @@ open class BaseLoadMoreModule(private val baseQuickAdapter: BaseQuickAdapter<*,
return
-
1
}
return
baseQuickAdapter
.
let
{
it
.
getHeaderLayoutCount
()
+
it
.
data
.
size
+
it
.
getFooterLayoutCount
()
it
.
headerLayoutCount
+
it
.
data
.
size
+
it
.
footerLayoutCount
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录