Fix preference icon tint
This commit is contained in:
parent
e4a4874edc
commit
3d08f790fe
2 changed files with 9 additions and 1 deletions
|
@ -16,6 +16,7 @@ package code.name.monkey.retromusic.preferences
|
||||||
|
|
||||||
import android.app.Dialog
|
import android.app.Dialog
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.graphics.PorterDuff
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
|
@ -28,6 +29,7 @@ import androidx.preference.DialogPreference
|
||||||
import androidx.preference.PreferenceDialogFragmentCompat
|
import androidx.preference.PreferenceDialogFragmentCompat
|
||||||
import androidx.viewpager.widget.PagerAdapter
|
import androidx.viewpager.widget.PagerAdapter
|
||||||
import androidx.viewpager.widget.ViewPager
|
import androidx.viewpager.widget.ViewPager
|
||||||
|
import code.name.monkey.appthemehelper.ThemeStore
|
||||||
import code.name.monkey.retromusic.App
|
import code.name.monkey.retromusic.App
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
import code.name.monkey.retromusic.fragments.NowPlayingScreen
|
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.PreferenceUtil
|
||||||
import code.name.monkey.retromusic.util.ViewUtil
|
import code.name.monkey.retromusic.util.ViewUtil
|
||||||
import com.afollestad.materialdialogs.MaterialDialog
|
import com.afollestad.materialdialogs.MaterialDialog
|
||||||
import com.afollestad.materialdialogs.bottomsheets.BottomSheet
|
|
||||||
import com.afollestad.materialdialogs.customview.customView
|
import com.afollestad.materialdialogs.customview.customView
|
||||||
import com.bumptech.glide.Glide
|
import com.bumptech.glide.Glide
|
||||||
|
|
||||||
|
@ -54,6 +55,10 @@ class NowPlayingScreenPreference : DialogPreference {
|
||||||
override fun getDialogLayoutResource(): Int {
|
override fun getDialogLayoutResource(): Int {
|
||||||
return mLayoutRes;
|
return mLayoutRes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
init {
|
||||||
|
icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class NowPlayingScreenPreferenceDialog : PreferenceDialogFragmentCompat(), ViewPager.OnPageChangeListener {
|
class NowPlayingScreenPreferenceDialog : PreferenceDialogFragmentCompat(), ViewPager.OnPageChangeListener {
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
package code.name.monkey.appthemehelper.common.prefs.supportv7
|
package code.name.monkey.appthemehelper.common.prefs.supportv7
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.graphics.PorterDuff
|
||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import androidx.preference.Preference
|
import androidx.preference.Preference
|
||||||
import code.name.monkey.appthemehelper.R
|
import code.name.monkey.appthemehelper.R
|
||||||
|
import code.name.monkey.appthemehelper.ThemeStore
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Aidan Follestad (afollestad)
|
* @author Aidan Follestad (afollestad)
|
||||||
|
@ -29,5 +31,6 @@ class ATEPreference : Preference {
|
||||||
|
|
||||||
private fun init() {
|
private fun init() {
|
||||||
layoutResource = R.layout.ate_preference_custom_support
|
layoutResource = R.layout.ate_preference_custom_support
|
||||||
|
icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue