From a4d9b7c8f718cdbc2803200c1a62138d78005490 Mon Sep 17 00:00:00 2001 From: h4h13 Date: Wed, 31 Jul 2019 00:37:48 +0530 Subject: [PATCH] Settings icons are not accent color --- app/src/main/AndroidManifest.xml | 2 +- .../retromusic/activities/SettingsActivity.kt | 4 +- .../dialogs/OptionsSheetDialogFragment.kt | 17 ------ .../fragments/settings/AudioSettings.kt | 2 - .../AlbumCoverStylePreferenceDialog.kt | 2 +- .../preferences/BlacklistPreferenceDialog.kt | 2 +- .../preferences/LibraryPreference.kt | 2 +- .../preferences/MaterialListPreference.kt | 2 +- .../NowPlayingScreenPreferenceDialog.kt | 2 +- .../retromusic/util/NavigationUtil.java | 7 +-- .../main/res/layout/fragment_main_options.xml | 39 ------------- app/src/main/res/values/strings.xml | 2 + app/src/main/res/xml/pref_audio.xml | 14 +---- .../main/res/xml/pref_now_playing_screen.xml | 56 ++++++++++--------- .../prefs/supportv7/ATEColorPreference.kt | 2 +- .../prefs/supportv7/ATEListPreference.kt | 2 +- .../common/prefs/supportv7/ATEPreference.kt | 2 +- .../prefs/supportv7/ATESeekBarPreference.kt | 2 +- .../prefs/supportv7/ATESwitchPreference.kt | 2 +- 19 files changed, 49 insertions(+), 114 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index d76e64d6..2be1391c 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -98,7 +98,7 @@ - + diff --git a/app/src/main/java/code/name/monkey/retromusic/activities/SettingsActivity.kt b/app/src/main/java/code/name/monkey/retromusic/activities/SettingsActivity.kt index 6beb8bb4..810fa1a8 100755 --- a/app/src/main/java/code/name/monkey/retromusic/activities/SettingsActivity.kt +++ b/app/src/main/java/code/name/monkey/retromusic/activities/SettingsActivity.kt @@ -8,6 +8,7 @@ import androidx.fragment.app.Fragment import androidx.transition.TransitionManager import code.name.monkey.appthemehelper.ThemeStore 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.activities.base.AbsBaseActivity import code.name.monkey.retromusic.fragments.settings.MainSettingsFragment @@ -40,9 +41,10 @@ class SettingsActivity : AbsBaseActivity(), SharedPreferences.OnSharedPreference setSupportActionBar(toolbar) setTitle(R.string.action_settings) toolbar.apply { + setTitleTextColor( ThemeStore.accentColor(context)) setBackgroundColor(ThemeStore.primaryColor(context)) setNavigationOnClickListener { onBackPressed() } - ToolbarContentTintHelper.colorBackButton(toolbar, ThemeStore.textColorSecondary(context)) + ToolbarContentTintHelper.colorBackButton(toolbar, ThemeStore.accentColor(context)) } appBarLayout.setBackgroundColor(ThemeStore.primaryColor(this)) diff --git a/app/src/main/java/code/name/monkey/retromusic/dialogs/OptionsSheetDialogFragment.kt b/app/src/main/java/code/name/monkey/retromusic/dialogs/OptionsSheetDialogFragment.kt index b0eb5f5e..c171f687 100644 --- a/app/src/main/java/code/name/monkey/retromusic/dialogs/OptionsSheetDialogFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/dialogs/OptionsSheetDialogFragment.kt @@ -42,11 +42,6 @@ class OptionsSheetDialogFragment : DialogFragment(), View.OnClickListener { R.id.actionFolders -> mainActivity.selectedFragment(R.id.action_folder) R.id.actionLibrary -> mainActivity.selectedFragment(PreferenceUtil.getInstance().lastPage) 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() } @@ -65,30 +60,18 @@ class OptionsSheetDialogFragment : DialogFragment(), View.OnClickListener { private lateinit var actionSettings: View private lateinit var actionLibrary: View - private lateinit var actionEqualizer: 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 override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { val layout = LayoutInflater.from(context).inflate(R.layout.fragment_main_options, null) actionSettings = layout.findViewById(R.id.actionSettings) actionLibrary = layout.findViewById(R.id.actionLibrary) - actionEqualizer = layout.findViewById(R.id.actionEqualizer) 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) actionLibrary.setOnClickListener(this) - actionEqualizer.setOnClickListener(this) actionFolders.setOnClickListener(this) - actionRate.setOnClickListener(this) - actionShare.setOnClickListener(this) - actionBugReport.setOnClickListener(this) materialDialog = MaterialDialog(activity!!, BottomSheet()) .show { diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/settings/AudioSettings.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/settings/AudioSettings.kt index 922f0955..50ed5ede 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/settings/AudioSettings.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/settings/AudioSettings.kt @@ -39,8 +39,6 @@ class AudioSettings : AbsSettingsFragment() { NavigationUtil.openEqualizer(activity!!) true } - - } private fun hasEqualizer(): Boolean { diff --git a/app/src/main/java/code/name/monkey/retromusic/preferences/AlbumCoverStylePreferenceDialog.kt b/app/src/main/java/code/name/monkey/retromusic/preferences/AlbumCoverStylePreferenceDialog.kt index c6f92d92..939f6d58 100644 --- a/app/src/main/java/code/name/monkey/retromusic/preferences/AlbumCoverStylePreferenceDialog.kt +++ b/app/src/main/java/code/name/monkey/retromusic/preferences/AlbumCoverStylePreferenceDialog.kt @@ -55,7 +55,7 @@ class AlbumCoverStylePreference : ATEDialogPreference { } init { - icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN) + icon?.setColorFilter(ThemeStore.accentColor(context), PorterDuff.Mode.SRC_IN) } } diff --git a/app/src/main/java/code/name/monkey/retromusic/preferences/BlacklistPreferenceDialog.kt b/app/src/main/java/code/name/monkey/retromusic/preferences/BlacklistPreferenceDialog.kt index 780bf798..259f399f 100644 --- a/app/src/main/java/code/name/monkey/retromusic/preferences/BlacklistPreferenceDialog.kt +++ b/app/src/main/java/code/name/monkey/retromusic/preferences/BlacklistPreferenceDialog.kt @@ -42,7 +42,7 @@ class BlacklistPreference : ATEDialogPreference { constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes) init { - icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN) + icon?.setColorFilter(ThemeStore.accentColor(context), PorterDuff.Mode.SRC_IN) } } diff --git a/app/src/main/java/code/name/monkey/retromusic/preferences/LibraryPreference.kt b/app/src/main/java/code/name/monkey/retromusic/preferences/LibraryPreference.kt index c5428ebe..2e2c6c57 100644 --- a/app/src/main/java/code/name/monkey/retromusic/preferences/LibraryPreference.kt +++ b/app/src/main/java/code/name/monkey/retromusic/preferences/LibraryPreference.kt @@ -44,7 +44,7 @@ class LibraryPreference : ATEDialogPreference { constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes) {} init { - icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN) + icon?.setColorFilter(ThemeStore.accentColor(context), PorterDuff.Mode.SRC_IN) } } diff --git a/app/src/main/java/code/name/monkey/retromusic/preferences/MaterialListPreference.kt b/app/src/main/java/code/name/monkey/retromusic/preferences/MaterialListPreference.kt index cff272f2..542a73a0 100644 --- a/app/src/main/java/code/name/monkey/retromusic/preferences/MaterialListPreference.kt +++ b/app/src/main/java/code/name/monkey/retromusic/preferences/MaterialListPreference.kt @@ -37,7 +37,7 @@ class MaterialListPreference : ListPreference { } 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) { diff --git a/app/src/main/java/code/name/monkey/retromusic/preferences/NowPlayingScreenPreferenceDialog.kt b/app/src/main/java/code/name/monkey/retromusic/preferences/NowPlayingScreenPreferenceDialog.kt index 4feceb65..967c9333 100644 --- a/app/src/main/java/code/name/monkey/retromusic/preferences/NowPlayingScreenPreferenceDialog.kt +++ b/app/src/main/java/code/name/monkey/retromusic/preferences/NowPlayingScreenPreferenceDialog.kt @@ -57,7 +57,7 @@ class NowPlayingScreenPreference : ATEDialogPreference { } init { - icon?.setColorFilter(ThemeStore.textColorSecondary(context), PorterDuff.Mode.SRC_IN) + icon?.setColorFilter(ThemeStore.accentColor(context), PorterDuff.Mode.SRC_IN) } } diff --git a/app/src/main/java/code/name/monkey/retromusic/util/NavigationUtil.java b/app/src/main/java/code/name/monkey/retromusic/util/NavigationUtil.java index 4a4a3bc3..956865ab 100755 --- a/app/src/main/java/code/name/monkey/retromusic/util/NavigationUtil.java +++ b/app/src/main/java/code/name/monkey/retromusic/util/NavigationUtil.java @@ -31,7 +31,6 @@ import code.name.monkey.retromusic.R; import code.name.monkey.retromusic.activities.AboutActivity; import code.name.monkey.retromusic.activities.AlbumDetailsActivity; 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.LicenseActivity; import code.name.monkey.retromusic.activities.LyricsActivity; @@ -86,11 +85,7 @@ public class NavigationUtil { } public static void openEqualizer(@NonNull final Activity activity) { - if (PreferenceUtil.getInstance().getSelectedEqualizer().equals("system")) { - stockEqalizer(activity); - } else { - ActivityCompat.startActivity(activity, new Intent(activity, EqualizerActivity.class), null); - } + stockEqalizer(activity); } private static void stockEqalizer(@NonNull Activity activity) { diff --git a/app/src/main/res/layout/fragment_main_options.xml b/app/src/main/res/layout/fragment_main_options.xml index 1af6272c..5360c466 100644 --- a/app/src/main/res/layout/fragment_main_options.xml +++ b/app/src/main/res/layout/fragment_main_options.xml @@ -37,43 +37,4 @@ app:optionIcon="@drawable/ic_settings_white_24dp" app:optionTitle="@string/action_settings" /> - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f5f10d4a..c3129be7 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -630,4 +630,6 @@ Reset Library categories Configure visibility and order of library categories. + Controls + Album style diff --git a/app/src/main/res/xml/pref_audio.xml b/app/src/main/res/xml/pref_audio.xml index a81f3d75..ab2b10ce 100755 --- a/app/src/main/res/xml/pref_audio.xml +++ b/app/src/main/res/xml/pref_audio.xml @@ -17,18 +17,8 @@ android:title="@string/pref_title_gapless_playback" app:enableCopying="true" /> - - - diff --git a/app/src/main/res/xml/pref_now_playing_screen.xml b/app/src/main/res/xml/pref_now_playing_screen.xml index 38b14b3a..59bb7346 100644 --- a/app/src/main/res/xml/pref_now_playing_screen.xml +++ b/app/src/main/res/xml/pref_now_playing_screen.xml @@ -8,36 +8,39 @@ app:enableCopying="true" app:icon="@drawable/ic_play_circle_filled_white_24dp" /> - + + - + - + + + + - +