2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-11 13:11:01 +00:00

For #8643 and #7606 - Changed tint for onboarding icons

This commit is contained in:
Mihai Branescu 2020-04-28 13:55:16 +03:00
parent 03726384de
commit 4c0af91b7b

View File

@ -7,7 +7,7 @@ package org.mozilla.fenix.home.sessioncontrol.viewholders.onboarding
import android.widget.TextView
import androidx.annotation.DrawableRes
import androidx.appcompat.content.res.AppCompatResources
import androidx.core.content.ContextCompat
import mozilla.components.support.ktx.android.content.getColorFromAttr
import mozilla.components.support.ktx.android.view.putCompoundDrawablesRelative
import org.mozilla.fenix.R
import org.mozilla.fenix.ext.setBounds
@ -19,6 +19,6 @@ fun TextView.setOnboardingIcon(@DrawableRes id: Int) {
val icon = AppCompatResources.getDrawable(context, id)
val size = context.resources.getDimensionPixelSize(R.dimen.onboarding_header_icon_height_width)
icon?.setBounds(size)
icon?.setTint(ContextCompat.getColor(context, R.color.onboarding_card_icon))
icon?.setTint(context.getColorFromAttr(R.attr.onboardingSelected))
putCompoundDrawablesRelative(start = icon)
}