From 9bfff57405719065858fd9ffc1952ba12854a176 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Wed, 6 Sep 2023 10:29:38 +0200 Subject: [PATCH] Always use the same color as text uses in popups --- .../com/simplemobiletools/launcher/extensions/Activity.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/launcher/extensions/Activity.kt b/app/src/main/kotlin/com/simplemobiletools/launcher/extensions/Activity.kt index f7573d9..88abffd 100644 --- a/app/src/main/kotlin/com/simplemobiletools/launcher/extensions/Activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/launcher/extensions/Activity.kt @@ -12,6 +12,7 @@ import android.view.Gravity import android.view.View import android.widget.PopupMenu import androidx.core.view.forEach +import com.google.android.material.color.MaterialColors import com.simplemobiletools.commons.extensions.getPopupMenuTheme import com.simplemobiletools.commons.extensions.getProperTextColor import com.simplemobiletools.commons.extensions.showErrorToast @@ -81,7 +82,8 @@ fun Activity.handleGridItemPopupMenu(anchorView: View, gridItem: HomeScreenGridI inflate(R.menu.menu_app_icon) menu.forEach { - it.iconTintList = ColorStateList.valueOf(getProperTextColor()) + val color = MaterialColors.getColor(contextTheme, android.R.attr.textColorPrimary, getProperTextColor()) + it.iconTintList = ColorStateList.valueOf(color) } menu.findItem(R.id.rename).isVisible = (gridItem.type == ITEM_TYPE_ICON || gridItem.type == ITEM_TYPE_FOLDER) && !isOnAllAppsFragment menu.findItem(R.id.hide_icon).isVisible = gridItem.type == ITEM_TYPE_ICON && isOnAllAppsFragment