PagedList 中的空占位符是什么?
What is a null placeholder in PagedList?
我一直在试图弄清楚 Jetpac 组件的分页列表中的空占位符是什么。具体来说,文档说:
boolean enablePlaceholders
Defines whether the PagedList may display null placeholders, if the
DataSource provides them.
在这里https://developer.android.com/reference/android/arch/paging/PagedList.Config#enableplaceholders
但我不确定那是什么意思?当我将其设置为 true 与 false 时,我看不出有什么区别。
表示如果驱动PagedList
的DataSource
提供了位置信息(position,list size),那么pagedlist是否允许returnnull
如果项目在范围内,但尚未加载。
这允许您在用户滚动到未加载区域时呈现空占位符视图,而不是被迫限制滚动直到适配器知道请求的项目是否实际存在。
我一直在试图弄清楚 Jetpac 组件的分页列表中的空占位符是什么。具体来说,文档说:
boolean enablePlaceholders
Defines whether the PagedList may display null placeholders, if the DataSource provides them.
在这里https://developer.android.com/reference/android/arch/paging/PagedList.Config#enableplaceholders
但我不确定那是什么意思?当我将其设置为 true 与 false 时,我看不出有什么区别。
表示如果驱动PagedList
的DataSource
提供了位置信息(position,list size),那么pagedlist是否允许returnnull
如果项目在范围内,但尚未加载。
这允许您在用户滚动到未加载区域时呈现空占位符视图,而不是被迫限制滚动直到适配器知道请求的项目是否实际存在。