mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 04:57:59 +01:00
fix the icon color at manage folders screen
This commit is contained in:
parent
f82b09470b
commit
46582a3d01
1 changed files with 12 additions and 6 deletions
|
@ -1,10 +1,10 @@
|
||||||
package com.simplemobiletools.gallery.activities
|
package com.simplemobiletools.gallery.activities
|
||||||
|
|
||||||
|
import android.graphics.PorterDuff
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
||||||
import com.simplemobiletools.commons.extensions.updateTextColors
|
|
||||||
import com.simplemobiletools.gallery.R
|
import com.simplemobiletools.gallery.R
|
||||||
import com.simplemobiletools.gallery.extensions.config
|
import com.simplemobiletools.gallery.extensions.config
|
||||||
import kotlinx.android.synthetic.main.activity_excluded_folders.*
|
import kotlinx.android.synthetic.main.activity_excluded_folders.*
|
||||||
|
@ -22,15 +22,21 @@ class ExcludedFoldersActivity : SimpleActivity() {
|
||||||
val folders = config.excludedFolders
|
val folders = config.excludedFolders
|
||||||
for (folder in folders) {
|
for (folder in folders) {
|
||||||
layoutInflater.inflate(R.layout.item_excluded_folder, null, false).apply {
|
layoutInflater.inflate(R.layout.item_excluded_folder, null, false).apply {
|
||||||
excluded_folder_title.text = folder
|
excluded_folder_title.apply {
|
||||||
excluded_folders_icon.setOnClickListener {
|
text = folder
|
||||||
config.removeExcludedFolder(folder)
|
setTextColor(config.textColor)
|
||||||
updateExcludedFolders()
|
}
|
||||||
|
excluded_folders_icon.apply {
|
||||||
|
setColorFilter(config.textColor, PorterDuff.Mode.SRC_IN)
|
||||||
|
alpha = 0.7f
|
||||||
|
setOnClickListener {
|
||||||
|
config.removeExcludedFolder(folder)
|
||||||
|
updateExcludedFolders()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
excluded_folders_holder.addView(this)
|
excluded_folders_holder.addView(this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
updateTextColors(excluded_folders_holder)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateOptionsMenu(menu: Menu?): Boolean {
|
override fun onCreateOptionsMenu(menu: Menu?): Boolean {
|
||||||
|
|
Loading…
Reference in a new issue