properly update file/folder placeholder colors when text color changes
This commit is contained in:
parent
d2dcc5417f
commit
0a023dd0fa
2 changed files with 9 additions and 6 deletions
app/src/main/kotlin/com/simplemobiletools/filemanager
|
@ -97,7 +97,7 @@ class ItemsAdapter(activity: SimpleActivity, var fileDirItems: MutableList<FileD
|
|||
|
||||
override fun getItemCount() = fileDirItems.size
|
||||
|
||||
private fun initDrawables() {
|
||||
fun initDrawables() {
|
||||
folderDrawable = activity.resources.getColoredDrawableWithColor(R.drawable.ic_folder, textColor)
|
||||
fileDrawable = activity.resources.getColoredDrawableWithColor(R.drawable.ic_file, textColor)
|
||||
folderDrawable.alpha = 180
|
||||
|
|
|
@ -75,12 +75,15 @@ class ItemsFragment : Fragment(), ItemsAdapter.ItemOperationsListener, Breadcrum
|
|||
super.onResume()
|
||||
context!!.updateTextColors(mView as ViewGroup)
|
||||
mView.items_fastscroller.updateHandleColor()
|
||||
val newColor = context!!.config.textColor
|
||||
if (storedTextColor != newColor) {
|
||||
val newTextColor = context!!.config.textColor
|
||||
if (storedTextColor != newTextColor) {
|
||||
storedItems = ArrayList()
|
||||
(items_list.adapter as? ItemsAdapter)?.updateTextColor(newColor)
|
||||
mView.breadcrumbs.updateColor(newColor)
|
||||
storedTextColor = newColor
|
||||
(items_list.adapter as? ItemsAdapter)?.apply {
|
||||
updateTextColor(newTextColor)
|
||||
initDrawables()
|
||||
}
|
||||
mView.breadcrumbs.updateColor(newTextColor)
|
||||
storedTextColor = newTextColor
|
||||
}
|
||||
|
||||
refreshItems()
|
||||
|
|
Loading…
Reference in a new issue