From 46582a3d0158a8669e82b69d66c0a9cffccae12d Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 27 Feb 2017 20:20:38 +0100 Subject: [PATCH] fix the icon color at manage folders screen --- .../activities/ExcludedFoldersActivity.kt | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ExcludedFoldersActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ExcludedFoldersActivity.kt index 4b1d5fe2a..74bb40c0c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ExcludedFoldersActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ExcludedFoldersActivity.kt @@ -1,10 +1,10 @@ package com.simplemobiletools.gallery.activities +import android.graphics.PorterDuff import android.os.Bundle import android.view.Menu import android.view.MenuItem import com.simplemobiletools.commons.dialogs.ConfirmationDialog -import com.simplemobiletools.commons.extensions.updateTextColors import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.extensions.config import kotlinx.android.synthetic.main.activity_excluded_folders.* @@ -22,15 +22,21 @@ class ExcludedFoldersActivity : SimpleActivity() { val folders = config.excludedFolders for (folder in folders) { layoutInflater.inflate(R.layout.item_excluded_folder, null, false).apply { - excluded_folder_title.text = folder - excluded_folders_icon.setOnClickListener { - config.removeExcludedFolder(folder) - updateExcludedFolders() + excluded_folder_title.apply { + text = folder + setTextColor(config.textColor) + } + excluded_folders_icon.apply { + setColorFilter(config.textColor, PorterDuff.Mode.SRC_IN) + alpha = 0.7f + setOnClickListener { + config.removeExcludedFolder(folder) + updateExcludedFolders() + } } excluded_folders_holder.addView(this) } } - updateTextColors(excluded_folders_holder) } override fun onCreateOptionsMenu(menu: Menu?): Boolean {