Commit eef5cf34 authored by Mihai Branescu's avatar Mihai Branescu Committed by Emily Kager
Browse files

For #10482 - made SVG gradient compatible with API < 22

parent 138d8e64
......@@ -6,7 +6,7 @@ package org.mozilla.fenix.onboarding
import android.content.Context
import android.util.AttributeSet
import android.widget.ImageButton
import android.widget.ImageView
import androidx.appcompat.widget.AppCompatRadioButton
import androidx.core.content.edit
import androidx.core.content.withStyledAttributes
......@@ -15,7 +15,7 @@ import org.mozilla.fenix.ext.settings
class OnboardingRadioButton(context: Context, attrs: AttributeSet) : AppCompatRadioButton(context, attrs) {
private val radioGroups = mutableListOf<OnboardingRadioButton>()
private var illustration: ImageButton? = null
private var illustration: ImageView? = null
private var clickListener: (() -> Unit)? = null
var key: Int = 0
......@@ -33,7 +33,7 @@ class OnboardingRadioButton(context: Context, attrs: AttributeSet) : AppCompatRa
radioGroups.add(radioButton)
}
fun addIllustration(illustration: ImageButton) {
fun addIllustration(illustration: ImageView) {
this.illustration = illustration
}
......
......@@ -58,13 +58,13 @@
android:buttonTint="@color/onboarding_radio_button_color"
app:onboardingKey="@string/pref_key_light_theme" />
<ImageButton
<ImageView
android:id="@+id/theme_light_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:background="@drawable/onboarding_light_theme"
app:srcCompat="@drawable/onboarding_light_theme"
android:contentDescription="@string/onboarding_theme_light_title"
android:foreground="@drawable/rounded_ripple"
app:layout_constraintEnd_toStartOf="@+id/theme_dark_image"
......@@ -85,14 +85,14 @@
android:buttonTint="@color/onboarding_radio_button_color"
app:onboardingKey="@string/pref_key_dark_theme" />
<ImageButton
<ImageView
android:id="@+id/theme_dark_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:background="@drawable/onboarding_dark_theme"
app:srcCompat="@drawable/onboarding_dark_theme"
android:contentDescription="@string/onboarding_theme_dark_title"
android:foreground="@drawable/rounded_ripple"
app:layout_constraintEnd_toEndOf="parent"
......
......@@ -61,13 +61,13 @@
android:buttonTint="@color/onboarding_radio_button_color"
app:onboardingKey="@string/pref_key_toolbar_top" />
<ImageButton
<ImageView
android:id="@+id/toolbar_top_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:background="@drawable/onboarding_toolbar_top"
app:srcCompat="@drawable/onboarding_toolbar_top"
android:contentDescription="@string/preference_top_toolbar"
android:foreground="@drawable/rounded_ripple"
app:layout_constraintEnd_toStartOf="@+id/toolbar_bottom_image"
......@@ -89,14 +89,14 @@
android:buttonTint="@color/onboarding_radio_button_color"
app:onboardingKey="@string/pref_key_toolbar_bottom" />
<ImageButton
<ImageView
android:id="@+id/toolbar_bottom_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:background="@drawable/onboarding_toolbar_bottom"
app:srcCompat="@drawable/onboarding_toolbar_bottom"
android:contentDescription="@string/preference_bottom_toolbar"
android:foreground="@drawable/rounded_ripple"
app:layout_constraintEnd_toEndOf="parent"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment