1
0
Fork 0

For #2570: Hide 3-dots menu for all library items when in select mode. (#6736)

notifyDataSetChanged to avoid not displayed but created items not being redrawn
master
Mihai Adrian 2019-11-27 10:40:38 +02:00 committed by GitHub
parent 531f7e7a67
commit 4fd3aa8649
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -30,8 +30,7 @@ open class LibraryPageView(
foregroundColor = context.getColorFromAttr(R.attr.primaryText),
backgroundColor = context.getColorFromAttr(R.attr.foundation)
)
libraryItemsList.setItemViewCacheSize(0)
libraryItemsList.adapter?.notifyItemRangeChanged(0, libraryItemsList.childCount)
libraryItemsList.adapter?.notifyDataSetChanged()
}
protected fun setUiForSelectingMode(
@ -43,8 +42,7 @@ open class LibraryPageView(
foregroundColor = ContextCompat.getColor(context, R.color.white_color),
backgroundColor = context.getColorFromAttr(R.attr.accentHighContrast)
)
libraryItemsList.setItemViewCacheSize(0)
libraryItemsList.adapter?.notifyItemRangeChanged(0, libraryItemsList.childCount)
libraryItemsList.adapter?.notifyDataSetChanged()
}
private fun updateToolbar(title: String?, foregroundColor: Int, backgroundColor: Int) {