Text and color changes

This commit is contained in:
Hemanth S 2021-10-21 23:21:19 +05:30
parent 79238ede7a
commit 68787f4f08
5 changed files with 16 additions and 5 deletions

View file

@ -4,7 +4,13 @@ import android.content.Context
import android.content.res.ColorStateList import android.content.res.ColorStateList
import android.util.AttributeSet import android.util.AttributeSet
import androidx.appcompat.widget.AppCompatImageView import androidx.appcompat.widget.AppCompatImageView
import androidx.core.content.ContextCompat
import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.appthemehelper.util.VersionUtils
import code.name.monkey.retromusic.App
import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.extensions.accentColor import code.name.monkey.retromusic.extensions.accentColor
import code.name.monkey.retromusic.util.PreferenceUtil
class AccentIcon @JvmOverloads constructor( class AccentIcon @JvmOverloads constructor(
context: Context, context: Context,
@ -12,6 +18,11 @@ class AccentIcon @JvmOverloads constructor(
defStyleAttr: Int = -1 defStyleAttr: Int = -1
) : AppCompatImageView(context, attrs, defStyleAttr) { ) : AppCompatImageView(context, attrs, defStyleAttr) {
init { init {
imageTintList = ColorStateList.valueOf(accentColor()) val color = if (PreferenceUtil.materialYou && VersionUtils.hasS()) {
ContextCompat.getColor(context, R.color.m3_accent_color)
} else {
ThemeStore.accentColor(context)
}
imageTintList = ColorStateList.valueOf(color)
} }
} }

View file

@ -21,7 +21,7 @@
android:paddingEnd="?attr/listPreferredItemPaddingEnd" android:paddingEnd="?attr/listPreferredItemPaddingEnd"
android:paddingBottom="?attr/listPreferredItemPaddingEnd" android:paddingBottom="?attr/listPreferredItemPaddingEnd"
android:text="@string/credit_title" android:text="@string/credit_title"
android:textAppearance="@style/TextViewOverline" android:textAppearance="@style/TextViewNormal"
android:textColor="?android:attr/textColorSecondary" android:textColor="?android:attr/textColorSecondary"
app:layout_constrainedWidth="true" app:layout_constrainedWidth="true"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"

View file

@ -20,7 +20,7 @@
android:paddingEnd="?attr/listPreferredItemPaddingEnd" android:paddingEnd="?attr/listPreferredItemPaddingEnd"
android:paddingBottom="?attr/listPreferredItemPaddingEnd" android:paddingBottom="?attr/listPreferredItemPaddingEnd"
android:text="@string/others" android:text="@string/others"
android:textAppearance="@style/TextViewOverline" android:textAppearance="@style/TextViewNormal"
android:textColor="?colorAccent" android:textColor="?colorAccent"
app:layout_constrainedWidth="true" app:layout_constrainedWidth="true"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"

View file

@ -20,7 +20,7 @@
android:paddingEnd="?attr/listPreferredItemPaddingEnd" android:paddingEnd="?attr/listPreferredItemPaddingEnd"
android:paddingBottom="?attr/listPreferredItemPaddingEnd" android:paddingBottom="?attr/listPreferredItemPaddingEnd"
android:text="@string/support_development" android:text="@string/support_development"
android:textAppearance="@style/TextViewOverline" android:textAppearance="@style/TextViewNormal"
android:textColor="?android:attr/textColorSecondary" android:textColor="?android:attr/textColorSecondary"
app:layout_constrainedWidth="true" app:layout_constrainedWidth="true"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"

View file

@ -20,7 +20,7 @@
android:paddingEnd="?attr/listPreferredItemPaddingEnd" android:paddingEnd="?attr/listPreferredItemPaddingEnd"
android:paddingBottom="?attr/listPreferredItemPaddingEnd" android:paddingBottom="?attr/listPreferredItemPaddingEnd"
android:text="@string/social" android:text="@string/social"
android:textAppearance="@style/TextViewOverline" android:textAppearance="@style/TextViewNormal"
android:textColor="?colorAccent" android:textColor="?colorAccent"
app:layout_constrainedWidth="true" app:layout_constrainedWidth="true"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"