Cherish: Pulse: Add automatic album art color mode [3/3]

Change-Id: Ic39836e969eb885198fabcdaa159e991f2a59187
This commit is contained in:
Ezio Lacandia Bijelkic
2020-06-15 21:41:12 +00:00
committed by Hưng Phan
parent 361e48f3d8
commit a42f967428
3 changed files with 8 additions and 0 deletions

View File

@@ -604,11 +604,13 @@
<item>@string/pulse_color_accent</item> <item>@string/pulse_color_accent</item>
<item>@string/pulse_color_custom</item> <item>@string/pulse_color_custom</item>
<item>@string/pulse_color_lava_lamp</item> <item>@string/pulse_color_lava_lamp</item>
<item>@string/pulse_color_auto</item>
</string-array> </string-array>
<string-array name="pulse_color_mode_values" translatable="false"> <string-array name="pulse_color_mode_values" translatable="false">
<item>0</item> <item>0</item>
<item>1</item> <item>1</item>
<item>2</item> <item>2</item>
<item>3</item>
</string-array> </string-array>
</resources> </resources>

View File

@@ -700,6 +700,7 @@
<string name="pulse_color_accent">Accent</string> <string name="pulse_color_accent">Accent</string>
<string name="pulse_color_custom">Custom</string> <string name="pulse_color_custom">Custom</string>
<string name="pulse_color_lava_lamp">Lava lamp</string> <string name="pulse_color_lava_lamp">Lava lamp</string>
<string name="pulse_color_auto">Album art</string>
<string name="pulse_color_chooser">Choose color</string> <string name="pulse_color_chooser">Choose color</string>
<string name="smoothing_enabled_title">Turn on smoothing</string> <string name="smoothing_enabled_title">Turn on smoothing</string>
<string name="smoothing_enabled_summary">Each bar is animated more smoothly</string> <string name="smoothing_enabled_summary">Each bar is animated more smoothly</string>

View File

@@ -58,6 +58,7 @@ public class PulseSettings extends SettingsPreferenceFragment implements
private static final int COLOR_TYPE_ACCENT = 0; private static final int COLOR_TYPE_ACCENT = 0;
private static final int COLOR_TYPE_USER = 1; private static final int COLOR_TYPE_USER = 1;
private static final int COLOR_TYPE_LAVALAMP = 2; private static final int COLOR_TYPE_LAVALAMP = 2;
private static final int COLOR_TYPE_AUTO = 3;
private Preference mRenderMode; private Preference mRenderMode;
private ListPreference mColorModePref; private ListPreference mColorModePref;
@@ -117,6 +118,10 @@ public class PulseSettings extends SettingsPreferenceFragment implements
mColorPickerPref.setEnabled(false); mColorPickerPref.setEnabled(false);
mLavaSpeedPref.setEnabled(true); mLavaSpeedPref.setEnabled(true);
break; break;
case COLOR_TYPE_AUTO:
mColorPickerPref.setEnabled(false);
mLavaSpeedPref.setEnabled(false);
break;
} }
} }