diff --git a/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/onboarding/OnboardingIcon.kt b/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/onboarding/OnboardingIcon.kt index c66781b1be..f1673be05b 100644 --- a/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/onboarding/OnboardingIcon.kt +++ b/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/onboarding/OnboardingIcon.kt @@ -5,7 +5,6 @@ package org.mozilla.fenix.home.sessioncontrol.viewholders.onboarding import android.widget.TextView -import androidx.annotation.ColorRes import androidx.annotation.DrawableRes import androidx.appcompat.content.res.AppCompatResources import androidx.core.content.ContextCompat @@ -16,12 +15,10 @@ import org.mozilla.fenix.ext.setBounds /** * Sets the drawableStart of a header in an onboarding card. */ -fun TextView.setOnboardingIcon(@DrawableRes id: Int, @ColorRes tint: Int? = null) { +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) - tint?.let { - icon?.setTint(ContextCompat.getColor(context, tint)) - } + icon?.setTint(ContextCompat.getColor(context, R.color.onboarding_card_icon)) putCompoundDrawablesRelative(start = icon) } diff --git a/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/onboarding/OnboardingTrackingProtectionViewHolder.kt b/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/onboarding/OnboardingTrackingProtectionViewHolder.kt index a71fec6377..f531f58862 100644 --- a/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/onboarding/OnboardingTrackingProtectionViewHolder.kt +++ b/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/onboarding/OnboardingTrackingProtectionViewHolder.kt @@ -8,8 +8,6 @@ import android.view.View import android.widget.Switch import androidx.recyclerview.widget.RecyclerView import kotlinx.android.synthetic.main.onboarding_tracking_protection.view.* -import kotlinx.android.synthetic.main.onboarding_tracking_protection.view.description_text -import kotlinx.android.synthetic.main.onboarding_tracking_protection.view.header_text import org.mozilla.fenix.R import org.mozilla.fenix.ext.components import org.mozilla.fenix.ext.settings diff --git a/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/onboarding/OnboardingWhatsNewViewHolder.kt b/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/onboarding/OnboardingWhatsNewViewHolder.kt index 3b65bd44f7..29d147b3d3 100644 --- a/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/onboarding/OnboardingWhatsNewViewHolder.kt +++ b/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/onboarding/OnboardingWhatsNewViewHolder.kt @@ -8,16 +8,14 @@ import android.text.SpannableString import android.text.style.UnderlineSpan import android.view.View import androidx.recyclerview.widget.RecyclerView -import kotlinx.android.synthetic.main.onboarding_tracking_protection.view.header_text import kotlinx.android.synthetic.main.onboarding_whats_new.view.* -import kotlinx.android.synthetic.main.onboarding_whats_new.view.description_text import org.mozilla.fenix.R import org.mozilla.fenix.settings.SupportUtils class OnboardingWhatsNewViewHolder(view: View) : RecyclerView.ViewHolder(view) { init { - view.header_text.setOnboardingIcon(R.drawable.ic_whats_new, R.color.accent_bright_dark_theme) + view.header_text.setOnboardingIcon(R.drawable.ic_whats_new) val appName = view.context.getString(R.string.app_name) view.description_text.text = view.context.getString(R.string.onboarding_whats_new_description, appName) diff --git a/app/src/main/res/layout/onboarding_finish.xml b/app/src/main/res/layout/onboarding_finish.xml index 5dfab907cb..3a4049e3cb 100644 --- a/app/src/main/res/layout/onboarding_finish.xml +++ b/app/src/main/res/layout/onboarding_finish.xml @@ -8,7 +8,7 @@ android:layout_height="wrap_content" android:layout_marginBottom="16dp" android:background="@drawable/onboarding_button_background" - android:backgroundTint="?accent" + android:backgroundTint="@color/onboarding_card_icon" android:clickable="true" android:focusable="true" android:gravity="center" diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index 4b72d9efb4..413e9c0f71 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -43,4 +43,7 @@ @color/primary_text_dark_theme + + + @color/accent_dark_theme diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 6dd0f485e7..0ecab6f384 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -212,6 +212,7 @@ #FFFFFF #F9F9FB #312A65 + @color/accent_bright_light_theme #E3E2E3