notifyDataSetChanged to avoid not displayed but created items not being redrawnmaster
parent
531f7e7a67
commit
4fd3aa8649
|
@ -30,8 +30,7 @@ open class LibraryPageView(
|
||||||
foregroundColor = context.getColorFromAttr(R.attr.primaryText),
|
foregroundColor = context.getColorFromAttr(R.attr.primaryText),
|
||||||
backgroundColor = context.getColorFromAttr(R.attr.foundation)
|
backgroundColor = context.getColorFromAttr(R.attr.foundation)
|
||||||
)
|
)
|
||||||
libraryItemsList.setItemViewCacheSize(0)
|
libraryItemsList.adapter?.notifyDataSetChanged()
|
||||||
libraryItemsList.adapter?.notifyItemRangeChanged(0, libraryItemsList.childCount)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected fun setUiForSelectingMode(
|
protected fun setUiForSelectingMode(
|
||||||
|
@ -43,8 +42,7 @@ open class LibraryPageView(
|
||||||
foregroundColor = ContextCompat.getColor(context, R.color.white_color),
|
foregroundColor = ContextCompat.getColor(context, R.color.white_color),
|
||||||
backgroundColor = context.getColorFromAttr(R.attr.accentHighContrast)
|
backgroundColor = context.getColorFromAttr(R.attr.accentHighContrast)
|
||||||
)
|
)
|
||||||
libraryItemsList.setItemViewCacheSize(0)
|
libraryItemsList.adapter?.notifyDataSetChanged()
|
||||||
libraryItemsList.adapter?.notifyItemRangeChanged(0, libraryItemsList.childCount)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateToolbar(title: String?, foregroundColor: Int, backgroundColor: Int) {
|
private fun updateToolbar(title: String?, foregroundColor: Int, backgroundColor: Int) {
|
||||||
|
|
Loading…
Reference in New Issue