Fix preference icon tint

This commit is contained in:
h4h13 2019-07-08 20:05:46 +05:30
parent e4a4874edc
commit 3d08f790fe
2 changed files with 9 additions and 1 deletions

View file

@ -16,6 +16,7 @@ package code.name.monkey.retromusic.preferences
import android.app.Dialog
import android.content.Context
import android.graphics.PorterDuff
import android.os.Bundle
import android.util.AttributeSet
import android.view.LayoutInflater
@ -28,6 +29,7 @@ import androidx.preference.DialogPreference
import androidx.preference.PreferenceDialogFragmentCompat
import androidx.viewpager.widget.PagerAdapter
import androidx.viewpager.widget.ViewPager
import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.retromusic.App
import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.fragments.NowPlayingScreen
@ -35,7 +37,6 @@ import code.name.monkey.retromusic.util.NavigationUtil
import code.name.monkey.retromusic.util.PreferenceUtil
import code.name.monkey.retromusic.util.ViewUtil
import com.afollestad.materialdialogs.MaterialDialog
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
import com.afollestad.materialdialogs.customview.customView
import com.bumptech.glide.Glide
@ -54,6 +55,10 @@ class NowPlayingScreenPreference : DialogPreference {
override fun getDialogLayoutResource(): Int {
return mLayoutRes;
}
init {
icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
}
}
class NowPlayingScreenPreferenceDialog : PreferenceDialogFragmentCompat(), ViewPager.OnPageChangeListener {

View file

@ -1,9 +1,11 @@
package code.name.monkey.appthemehelper.common.prefs.supportv7
import android.content.Context
import android.graphics.PorterDuff
import android.util.AttributeSet
import androidx.preference.Preference
import code.name.monkey.appthemehelper.R
import code.name.monkey.appthemehelper.ThemeStore
/**
* @author Aidan Follestad (afollestad)
@ -29,5 +31,6 @@ class ATEPreference : Preference {
private fun init() {
layoutResource = R.layout.ate_preference_custom_support
icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
}
}