You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use the Sticky Header effect, the real Header is invisiable, like the picture. Why does this happen
Below is my code:
Header:
open class MenuContentTitleItem(var titlePos: Int, private val menuContentAdapter: IMenuContentAdapterBridge) : AbstractHeaderItem()
Adapter:
init {
contentAdapter.setDisplayHeadersAtStartUp(true)
contentAdapter.setStickyHeaders(true)
}
/**
* Set data to notifyDataSetChanged.
*/
var data: T? = null
set(value) {
field = value
navigatorAdapter.data = value
setupContentAdapter()
}
private fun setupContentAdapter() {
contentAdapter.clear()
val items = mutableListOf<AbstractFlexibleItem<*>>()
val titleCount = getTitleItemCount()
for (titleIndex in 0 until titleCount) {
items.add(MenuContentTitleItem(titleIndex, contentAdapter))
val subtitleCount = getSubtitleItemCount(titleIndex)
for (subtitleIndex in 0 until subtitleCount) {
items.add(MenuContentSubtitleItem(titleIndex, subtitleIndex, contentAdapter))
val productCount = getProductItemCount(titleIndex, subtitleIndex)
for (prodIndex in 0 until productCount) {
items.add(MenuContentProductItem(titleIndex, subtitleIndex, prodIndex, contentAdapter))
}
}
}
contentAdapter.addItems(0, items)
}
The text was updated successfully, but these errors were encountered:
When I use the Sticky Header effect, the real Header is invisiable, like the picture. Why does this happen
Below is my code:
Header:
open class MenuContentTitleItem(var titlePos: Int, private val menuContentAdapter: IMenuContentAdapterBridge) : AbstractHeaderItem()
Adapter:
init {
contentAdapter.setDisplayHeadersAtStartUp(true)
contentAdapter.setStickyHeaders(true)
}
The text was updated successfully, but these errors were encountered: