Settings icons are not accent color
parent
0b025f3516
commit
a4d9b7c8f7
|
@ -98,7 +98,7 @@
|
||||||
<activity android:name=".activities.GenreDetailsActivity" />
|
<activity android:name=".activities.GenreDetailsActivity" />
|
||||||
<activity android:name=".activities.LicenseActivity" />
|
<activity android:name=".activities.LicenseActivity" />
|
||||||
<activity android:name=".activities.PurchaseActivity" />
|
<activity android:name=".activities.PurchaseActivity" />
|
||||||
<activity android:name=".activities.EqualizerActivity" />
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".activities.SearchActivity"
|
android:name=".activities.SearchActivity"
|
||||||
android:windowSoftInputMode="stateVisible" />
|
android:windowSoftInputMode="stateVisible" />
|
||||||
|
|
|
@ -8,6 +8,7 @@ import androidx.fragment.app.Fragment
|
||||||
import androidx.transition.TransitionManager
|
import androidx.transition.TransitionManager
|
||||||
import code.name.monkey.appthemehelper.ThemeStore
|
import code.name.monkey.appthemehelper.ThemeStore
|
||||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||||
|
import code.name.monkey.retromusic.App.Companion.context
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
import code.name.monkey.retromusic.activities.base.AbsBaseActivity
|
import code.name.monkey.retromusic.activities.base.AbsBaseActivity
|
||||||
import code.name.monkey.retromusic.fragments.settings.MainSettingsFragment
|
import code.name.monkey.retromusic.fragments.settings.MainSettingsFragment
|
||||||
|
@ -40,9 +41,10 @@ class SettingsActivity : AbsBaseActivity(), SharedPreferences.OnSharedPreference
|
||||||
setSupportActionBar(toolbar)
|
setSupportActionBar(toolbar)
|
||||||
setTitle(R.string.action_settings)
|
setTitle(R.string.action_settings)
|
||||||
toolbar.apply {
|
toolbar.apply {
|
||||||
|
setTitleTextColor( ThemeStore.accentColor(context))
|
||||||
setBackgroundColor(ThemeStore.primaryColor(context))
|
setBackgroundColor(ThemeStore.primaryColor(context))
|
||||||
setNavigationOnClickListener { onBackPressed() }
|
setNavigationOnClickListener { onBackPressed() }
|
||||||
ToolbarContentTintHelper.colorBackButton(toolbar, ThemeStore.textColorSecondary(context))
|
ToolbarContentTintHelper.colorBackButton(toolbar, ThemeStore.accentColor(context))
|
||||||
}
|
}
|
||||||
appBarLayout.setBackgroundColor(ThemeStore.primaryColor(this))
|
appBarLayout.setBackgroundColor(ThemeStore.primaryColor(this))
|
||||||
|
|
||||||
|
|
|
@ -42,11 +42,6 @@ class OptionsSheetDialogFragment : DialogFragment(), View.OnClickListener {
|
||||||
R.id.actionFolders -> mainActivity.selectedFragment(R.id.action_folder)
|
R.id.actionFolders -> mainActivity.selectedFragment(R.id.action_folder)
|
||||||
R.id.actionLibrary -> mainActivity.selectedFragment(PreferenceUtil.getInstance().lastPage)
|
R.id.actionLibrary -> mainActivity.selectedFragment(PreferenceUtil.getInstance().lastPage)
|
||||||
R.id.actionSettings -> NavigationUtil.goToSettings(mainActivity)
|
R.id.actionSettings -> NavigationUtil.goToSettings(mainActivity)
|
||||||
R.id.actionRate -> NavigationUtil.goToPlayStore(mainActivity)
|
|
||||||
R.id.actionShare -> shareApp()
|
|
||||||
R.id.actionBugReport -> prepareBugReport()
|
|
||||||
R.id.actionEqualizer -> NavigationUtil.openEqualizer(mainActivity)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
materialDialog.dismiss()
|
materialDialog.dismiss()
|
||||||
}
|
}
|
||||||
|
@ -65,30 +60,18 @@ class OptionsSheetDialogFragment : DialogFragment(), View.OnClickListener {
|
||||||
|
|
||||||
private lateinit var actionSettings: View
|
private lateinit var actionSettings: View
|
||||||
private lateinit var actionLibrary: View
|
private lateinit var actionLibrary: View
|
||||||
private lateinit var actionEqualizer: View
|
|
||||||
private lateinit var actionFolders: View
|
private lateinit var actionFolders: View
|
||||||
private lateinit var actionRate: View
|
|
||||||
private lateinit var actionShare: View
|
|
||||||
private lateinit var actionBugReport: View
|
|
||||||
private lateinit var materialDialog: MaterialDialog
|
private lateinit var materialDialog: MaterialDialog
|
||||||
|
|
||||||
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||||
val layout = LayoutInflater.from(context).inflate(R.layout.fragment_main_options, null)
|
val layout = LayoutInflater.from(context).inflate(R.layout.fragment_main_options, null)
|
||||||
actionSettings = layout.findViewById(R.id.actionSettings)
|
actionSettings = layout.findViewById(R.id.actionSettings)
|
||||||
actionLibrary = layout.findViewById(R.id.actionLibrary)
|
actionLibrary = layout.findViewById(R.id.actionLibrary)
|
||||||
actionEqualizer = layout.findViewById(R.id.actionEqualizer)
|
|
||||||
actionFolders = layout.findViewById(R.id.actionFolders)
|
actionFolders = layout.findViewById(R.id.actionFolders)
|
||||||
actionRate = layout.findViewById(R.id.actionRate)
|
|
||||||
actionShare = layout.findViewById(R.id.actionShare)
|
|
||||||
actionBugReport = layout.findViewById(R.id.actionBugReport)
|
|
||||||
|
|
||||||
actionSettings.setOnClickListener(this)
|
actionSettings.setOnClickListener(this)
|
||||||
actionLibrary.setOnClickListener(this)
|
actionLibrary.setOnClickListener(this)
|
||||||
actionEqualizer.setOnClickListener(this)
|
|
||||||
actionFolders.setOnClickListener(this)
|
actionFolders.setOnClickListener(this)
|
||||||
actionRate.setOnClickListener(this)
|
|
||||||
actionShare.setOnClickListener(this)
|
|
||||||
actionBugReport.setOnClickListener(this)
|
|
||||||
|
|
||||||
materialDialog = MaterialDialog(activity!!, BottomSheet())
|
materialDialog = MaterialDialog(activity!!, BottomSheet())
|
||||||
.show {
|
.show {
|
||||||
|
|
|
@ -39,8 +39,6 @@ class AudioSettings : AbsSettingsFragment() {
|
||||||
NavigationUtil.openEqualizer(activity!!)
|
NavigationUtil.openEqualizer(activity!!)
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun hasEqualizer(): Boolean {
|
private fun hasEqualizer(): Boolean {
|
||||||
|
|
|
@ -55,7 +55,7 @@ class AlbumCoverStylePreference : ATEDialogPreference {
|
||||||
}
|
}
|
||||||
|
|
||||||
init {
|
init {
|
||||||
icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
|
icon?.setColorFilter(ThemeStore.accentColor(context), PorterDuff.Mode.SRC_IN)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ class BlacklistPreference : ATEDialogPreference {
|
||||||
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes)
|
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes)
|
||||||
|
|
||||||
init {
|
init {
|
||||||
icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
|
icon?.setColorFilter(ThemeStore.accentColor(context), PorterDuff.Mode.SRC_IN)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ class LibraryPreference : ATEDialogPreference {
|
||||||
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes) {}
|
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes) {}
|
||||||
|
|
||||||
init {
|
init {
|
||||||
icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
|
icon?.setColorFilter(ThemeStore.accentColor(context), PorterDuff.Mode.SRC_IN)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ class MaterialListPreference : ListPreference {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun init(context: Context) {
|
private fun init(context: Context) {
|
||||||
icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
|
icon?.setColorFilter(ThemeStore.accentColor(context), PorterDuff.Mode.SRC_IN)
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
|
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
|
||||||
|
|
|
@ -57,7 +57,7 @@ class NowPlayingScreenPreference : ATEDialogPreference {
|
||||||
}
|
}
|
||||||
|
|
||||||
init {
|
init {
|
||||||
icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
|
icon?.setColorFilter(ThemeStore.accentColor(context), PorterDuff.Mode.SRC_IN)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,6 @@ import code.name.monkey.retromusic.R;
|
||||||
import code.name.monkey.retromusic.activities.AboutActivity;
|
import code.name.monkey.retromusic.activities.AboutActivity;
|
||||||
import code.name.monkey.retromusic.activities.AlbumDetailsActivity;
|
import code.name.monkey.retromusic.activities.AlbumDetailsActivity;
|
||||||
import code.name.monkey.retromusic.activities.ArtistDetailActivity;
|
import code.name.monkey.retromusic.activities.ArtistDetailActivity;
|
||||||
import code.name.monkey.retromusic.activities.EqualizerActivity;
|
|
||||||
import code.name.monkey.retromusic.activities.GenreDetailsActivity;
|
import code.name.monkey.retromusic.activities.GenreDetailsActivity;
|
||||||
import code.name.monkey.retromusic.activities.LicenseActivity;
|
import code.name.monkey.retromusic.activities.LicenseActivity;
|
||||||
import code.name.monkey.retromusic.activities.LyricsActivity;
|
import code.name.monkey.retromusic.activities.LyricsActivity;
|
||||||
|
@ -86,11 +85,7 @@ public class NavigationUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void openEqualizer(@NonNull final Activity activity) {
|
public static void openEqualizer(@NonNull final Activity activity) {
|
||||||
if (PreferenceUtil.getInstance().getSelectedEqualizer().equals("system")) {
|
|
||||||
stockEqalizer(activity);
|
stockEqalizer(activity);
|
||||||
} else {
|
|
||||||
ActivityCompat.startActivity(activity, new Intent(activity, EqualizerActivity.class), null);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void stockEqalizer(@NonNull Activity activity) {
|
private static void stockEqalizer(@NonNull Activity activity) {
|
||||||
|
|
|
@ -37,43 +37,4 @@
|
||||||
app:optionIcon="@drawable/ic_settings_white_24dp"
|
app:optionIcon="@drawable/ic_settings_white_24dp"
|
||||||
app:optionTitle="@string/action_settings" />
|
app:optionTitle="@string/action_settings" />
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.OptionMenuItemView
|
|
||||||
android:id="@+id/actionEqualizer"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="?rectSelector"
|
|
||||||
android:clickable="true"
|
|
||||||
android:focusable="true"
|
|
||||||
app:optionIcon="@drawable/ic_equalizer_white_24dp"
|
|
||||||
app:optionTitle="@string/equalizer" />
|
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.OptionMenuItemView
|
|
||||||
android:id="@+id/actionShare"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="?rectSelector"
|
|
||||||
android:clickable="true"
|
|
||||||
android:focusable="true"
|
|
||||||
app:optionIcon="@drawable/ic_share_white_24dp"
|
|
||||||
app:optionTitle="@string/action_share" />
|
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.OptionMenuItemView
|
|
||||||
android:id="@+id/actionBugReport"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="?rectSelector"
|
|
||||||
android:clickable="true"
|
|
||||||
android:focusable="true"
|
|
||||||
app:optionIcon="@drawable/ic_bug_report_white_24dp"
|
|
||||||
app:optionTitle="@string/report_bug" />
|
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.OptionMenuItemView
|
|
||||||
android:id="@+id/actionRate"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="?rectSelector"
|
|
||||||
android:clickable="true"
|
|
||||||
android:focusable="true"
|
|
||||||
app:optionIcon="@drawable/ic_star_white_24dp"
|
|
||||||
app:optionTitle="@string/rate_app" />
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -630,4 +630,6 @@
|
||||||
<string name="reset_action">Reset</string>
|
<string name="reset_action">Reset</string>
|
||||||
<string name="library_categories">Library categories</string>
|
<string name="library_categories">Library categories</string>
|
||||||
<string name="pref_summary_library_categories">Configure visibility and order of library categories.</string>
|
<string name="pref_summary_library_categories">Configure visibility and order of library categories.</string>
|
||||||
|
<string name="pref_header_controls">Controls</string>
|
||||||
|
<string name="pref_header_album">Album style</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -17,18 +17,8 @@
|
||||||
android:title="@string/pref_title_gapless_playback"
|
android:title="@string/pref_title_gapless_playback"
|
||||||
app:enableCopying="true" />
|
app:enableCopying="true" />
|
||||||
|
|
||||||
<code.name.monkey.retromusic.preferences.MaterialListPreference
|
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreference
|
||||||
android:defaultValue="system"
|
app:icon="@drawable/ic_equalizer_white_24dp"
|
||||||
android:entries="@array/pref_equalizer_types_titles"
|
|
||||||
android:entryValues="@array/pref_equalizer_types_values"
|
|
||||||
android:key="choose_equalizer"
|
|
||||||
android:negativeButtonText="@null"
|
|
||||||
android:positiveButtonText="@null"
|
|
||||||
android:title="@string/pref_title_choose_equalizer"
|
|
||||||
app:enableCopying="true"
|
|
||||||
app:icon="@drawable/ic_equalizer_white_24dp" />
|
|
||||||
|
|
||||||
<Preference
|
|
||||||
android:key="equalizer"
|
android:key="equalizer"
|
||||||
android:title="@string/equalizer"
|
android:title="@string/equalizer"
|
||||||
app:enableCopying="true" />
|
app:enableCopying="true" />
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
app:enableCopying="true"
|
app:enableCopying="true"
|
||||||
app:icon="@drawable/ic_play_circle_filled_white_24dp" />
|
app:icon="@drawable/ic_play_circle_filled_white_24dp" />
|
||||||
|
|
||||||
|
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory android:title="@string/pref_header_album">
|
||||||
<code.name.monkey.retromusic.preferences.AlbumCoverStylePreference
|
<code.name.monkey.retromusic.preferences.AlbumCoverStylePreference
|
||||||
android:key="album_cover_style_id"
|
android:key="album_cover_style_id"
|
||||||
android:title="@string/pref_title_album_cover_style"
|
android:title="@string/pref_title_album_cover_style"
|
||||||
|
@ -29,8 +30,9 @@
|
||||||
app:key="carousel_effect"
|
app:key="carousel_effect"
|
||||||
app:summary="@string/pref_summary_carousel_effect"
|
app:summary="@string/pref_summary_carousel_effect"
|
||||||
app:title="@string/pref_title_toggle_carousel_effect" />
|
app:title="@string/pref_title_toggle_carousel_effect" />
|
||||||
|
</code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
|
||||||
|
|
||||||
|
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory android:title="@string/pref_header_controls">
|
||||||
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
|
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
|
||||||
app:defaultValue="false"
|
app:defaultValue="false"
|
||||||
app:enableCopying="true"
|
app:enableCopying="true"
|
||||||
|
@ -39,6 +41,7 @@
|
||||||
app:summary="@string/pref_summary_extra_controls"
|
app:summary="@string/pref_summary_extra_controls"
|
||||||
app:title="@string/pref_title_extra_controls" />
|
app:title="@string/pref_title_extra_controls" />
|
||||||
|
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
|
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
|
||||||
app:defaultValue="false"
|
app:defaultValue="false"
|
||||||
app:enableCopying="true"
|
app:enableCopying="true"
|
||||||
|
@ -46,6 +49,7 @@
|
||||||
app:key="toggle_volume"
|
app:key="toggle_volume"
|
||||||
app:summary="@string/pref_summary_toggle_volume"
|
app:summary="@string/pref_summary_toggle_volume"
|
||||||
app:title="@string/pref_title_toggle_volume" />
|
app:title="@string/pref_title_toggle_volume" />
|
||||||
|
</code.name.monkey.appthemehelper.common.prefs.supportv7.ATEPreferenceCategory>
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESeekBarPreference
|
<code.name.monkey.appthemehelper.common.prefs.supportv7.ATESeekBarPreference
|
||||||
android:defaultValue="12"
|
android:defaultValue="12"
|
||||||
|
|
|
@ -39,7 +39,7 @@ class ATEColorPreference @JvmOverloads constructor(
|
||||||
widgetLayoutResource = R.layout.ate_preference_color
|
widgetLayoutResource = R.layout.ate_preference_color
|
||||||
isPersistent = false
|
isPersistent = false
|
||||||
|
|
||||||
icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
|
icon?.setColorFilter(ThemeStore.accentColor(context), PorterDuff.Mode.SRC_IN)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onBindViewHolder(holder: PreferenceViewHolder) {
|
override fun onBindViewHolder(holder: PreferenceViewHolder) {
|
||||||
|
|
|
@ -30,7 +30,7 @@ class ATEListPreference @JvmOverloads constructor(
|
||||||
) : ListPreference(context, attrs, defStyleAttr, defStyleRes) {
|
) : ListPreference(context, attrs, defStyleAttr, defStyleRes) {
|
||||||
|
|
||||||
init {
|
init {
|
||||||
icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
|
icon?.setColorFilter(ThemeStore.accentColor(context), PorterDuff.Mode.SRC_IN)
|
||||||
layoutResource = R.layout.ate_preference_custom_support
|
layoutResource = R.layout.ate_preference_custom_support
|
||||||
if (summary == null || summary.toString().trim { it <= ' ' }.isEmpty())
|
if (summary == null || summary.toString().trim { it <= ' ' }.isEmpty())
|
||||||
summary = "%s"
|
summary = "%s"
|
||||||
|
|
|
@ -30,6 +30,6 @@ class ATEPreference @JvmOverloads constructor(
|
||||||
|
|
||||||
init {
|
init {
|
||||||
layoutResource = R.layout.ate_preference_custom_support
|
layoutResource = R.layout.ate_preference_custom_support
|
||||||
icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
|
icon?.setColorFilter(ThemeStore.accentColor(context), PorterDuff.Mode.SRC_IN)
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -28,7 +28,7 @@ class ATESeekBarPreference : SeekBarPreference {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun init() {
|
private fun init() {
|
||||||
icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
|
icon?.setColorFilter(ThemeStore.accentColor(context), PorterDuff.Mode.SRC_IN)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onBindViewHolder(view: PreferenceViewHolder) {
|
override fun onBindViewHolder(view: PreferenceViewHolder) {
|
||||||
|
|
|
@ -33,6 +33,6 @@ class ATESwitchPreference : CheckBoxPreference {
|
||||||
|
|
||||||
private fun init() {
|
private fun init() {
|
||||||
widgetLayoutResource = R.layout.ate_preference_switch_support
|
widgetLayoutResource = R.layout.ate_preference_switch_support
|
||||||
icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN)
|
icon?.setColorFilter(ThemeStore.accentColor(context), PorterDuff.Mode.SRC_IN)
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue