Custom statusbar logo color options [2/2]
Signed-off-by: MOVZX <movzx@yahoo.com>
This commit is contained in:
@@ -157,7 +157,7 @@
|
||||
<item>8</item>
|
||||
<item>9</item>
|
||||
<item>10</item>
|
||||
<item>11</item>
|
||||
<item>11</item>
|
||||
<item>12</item>
|
||||
<item>13</item>
|
||||
</string-array>
|
||||
@@ -885,7 +885,7 @@
|
||||
<item>3</item>
|
||||
<item>4</item>
|
||||
</string-array>
|
||||
|
||||
|
||||
<string-array name="volume_styles_entries" translatable="false">
|
||||
<item>@string/default_value</item>
|
||||
<item>@string/double_layer_style</item>
|
||||
@@ -920,7 +920,7 @@
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
</string-array>
|
||||
|
||||
|
||||
<string-array name="wallpaper_blur_filter_entries">
|
||||
<item>@string/glass_blur</item>
|
||||
<item>@string/frosted_blur</item>
|
||||
@@ -1088,7 +1088,7 @@
|
||||
<item>@string/battery_bar_style_center_mirrored</item>
|
||||
<item>@string/battery_bar_style_reversed</item>
|
||||
</string-array>
|
||||
|
||||
|
||||
<string-array name="battery_bar_style_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
@@ -1121,4 +1121,16 @@
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Statusbar logo color -->
|
||||
<string-array name="status_bar_logo_color_entries" translatable="false">
|
||||
<item>@string/status_bar_logo_color_default</item>
|
||||
<item>@string/status_bar_logo_color_accent</item>
|
||||
<item>@string/status_bar_logo_color_custom</item>
|
||||
</string-array>
|
||||
<string-array name="status_bar_logo_color_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
<!-- Lock screen Clock Highlight Guide -->
|
||||
<string name="ls_clock_face_highlight_text">Swipe left or right to preview clock styles</string>
|
||||
|
||||
<!-- Lock screen Clock Revamp -->
|
||||
<!-- Lock screen Clock Revamp -->
|
||||
<string name="ls_clock_custom_font_not_supported">Selected clock does not support custom fonts</string>
|
||||
|
||||
<!-- Custom Clock Style -->
|
||||
@@ -219,8 +219,8 @@
|
||||
<string name="status_bar_battery_percent_title">Battery percent</string>
|
||||
<string name="status_bar_battery_percent_hidden">Hidden</string>
|
||||
<string name="status_bar_battery_percent_text_inside">Inside the icon</string>
|
||||
<string name="status_bar_battery_percent_text_next_right">Next to the icon (right)</string>
|
||||
<string name="status_bar_battery_percent_text_next_left">Next to the icon (left)</string>
|
||||
<string name="status_bar_battery_percent_text_next_right">Next to the icon (right)</string>
|
||||
<string name="status_bar_battery_percent_text_next_left">Next to the icon (left)</string>
|
||||
<string name="status_bar_battery_text_charging_title">Battery percentage when charging</string>
|
||||
<string name="status_bar_battery_text_charging_summary">Always display battery percentage when charging</string>
|
||||
<string name="status_bar_clock_and_date_title">Clock & date</string>
|
||||
@@ -752,7 +752,7 @@
|
||||
<!-- Lock screen media art fade level -->
|
||||
<string name="ls_media_art_fade_level_title">Media cover art fade level</string>
|
||||
<string name="ls_media_art_fade_level_summary">Set media cover art fade level</string>
|
||||
|
||||
|
||||
<!-- Lock screen media art blur level -->
|
||||
<string name="ls_media_art_blur_level_title">Media art blur level</string>
|
||||
<string name="ls_media_art_blur_level_summary">Blur intensity when blur filter is applied</string>
|
||||
@@ -844,7 +844,7 @@
|
||||
<string name="apply_button_text">Apply</string>
|
||||
<string name="font_picker_select_font">Select font</string>
|
||||
|
||||
<!-- Apply Button -->
|
||||
<!-- Apply Button -->
|
||||
<string name="apply_change_button_title">Apply</string>
|
||||
|
||||
<!-- Peek Display -->
|
||||
@@ -899,20 +899,20 @@
|
||||
<string name="circular_position_y_summary">Fine-tune vertical position</string>
|
||||
<string name="progress_footer_text">
|
||||
"The status bar progress bar provides real-time updates for both media playback and active downloads/uploads.
|
||||
|
||||
|
||||
- 🎵 Media Progress:
|
||||
• Displays playback progress for music and video when media is playing.
|
||||
• Single tap opens playback controls (Previous, Next track).
|
||||
• Double tap toggles play/pause.
|
||||
• Swipe left skips to the previous track.
|
||||
• Swipe right skips to the next track.
|
||||
• Long press opens the media app.
|
||||
|
||||
• Long press opens the media app.
|
||||
|
||||
- 📥 Download/Upload Progress:
|
||||
• Shows progress for ongoing downloads and uploads.
|
||||
• Automatically hides when no active transfers are detected.
|
||||
• Single tap opens the app responsible for the download.
|
||||
|
||||
|
||||
The progress bar dynamically switches between media and download states, ensuring you always have the most relevant information at a glance."
|
||||
</string>
|
||||
|
||||
@@ -991,4 +991,11 @@
|
||||
<string name="active_content_desc">Active</string>
|
||||
<string name="toast_failed_apply_font">Failed to apply font</string>
|
||||
<string name="toast_invalid_font_file">Invalid font file</string>
|
||||
|
||||
<!-- Statusbar logo color -->
|
||||
<string name="default_string">Default</string>
|
||||
<string name="status_bar_logo_color_title">Color</string>
|
||||
<string name="status_bar_logo_color_default">Default (White)</string>
|
||||
<string name="status_bar_logo_color_accent">Accent</string>
|
||||
<string name="status_bar_logo_color_custom">Custom</string>
|
||||
</resources>
|
||||
|
||||
@@ -169,6 +169,21 @@
|
||||
android:entryValues="@array/status_bar_logo_style_values"
|
||||
android:defaultValue="0"
|
||||
android:dependency="status_bar_logo" />
|
||||
|
||||
<!-- Logo color -->
|
||||
<org.evolution.settings.preferences.SystemSettingListPreference
|
||||
android:key="status_bar_logo_color"
|
||||
android:title="@string/status_bar_logo_color_title"
|
||||
android:entries="@array/status_bar_logo_color_entries"
|
||||
android:entryValues="@array/status_bar_logo_color_values"
|
||||
android:dependency="status_bar_logo"
|
||||
android:defaultValue="0" />
|
||||
|
||||
<!-- Logo custom color -->
|
||||
<org.evolution.settings.preferences.colorpicker.ColorPickerPreference
|
||||
android:key="status_bar_logo_color_picker"
|
||||
android:title="@string/status_bar_logo_color_custom"
|
||||
settings:defaultValue="0xFFFFFFFF" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<!--<PreferenceCategory
|
||||
|
||||
@@ -33,6 +33,8 @@ import org.evolution.settings.preferences.SystemSettingSwitchPreference;
|
||||
import org.evolution.settings.utils.DeviceUtils;
|
||||
import org.evolution.settings.utils.SystemUtils;
|
||||
|
||||
import org.evolution.settings.preferences.colorpicker.ColorPickerPreference;
|
||||
|
||||
@SearchIndexable
|
||||
public class StatusBar extends SettingsPreferenceFragment implements
|
||||
Preference.OnPreferenceChangeListener {
|
||||
@@ -46,6 +48,8 @@ public class StatusBar extends SettingsPreferenceFragment implements
|
||||
private static final String KEY_BATTERY_PERCENT = "status_bar_show_battery_percent";
|
||||
private static final String KEY_BATTERY_TEXT_CHARGING = "status_bar_battery_text_charging";
|
||||
private static final String KEY_BLUETOOTH_BATTERY_STATUS = "bluetooth_show_battery";
|
||||
private static final String LOGO_COLOR = "status_bar_logo_color";
|
||||
private static final String LOGO_COLOR_PICKER = "status_bar_logo_color_picker";
|
||||
private static final String KEY_COLORED_ICONS = "statusbar_colored_icons";
|
||||
|
||||
private static final int PULLDOWN_DIR_NONE = 0;
|
||||
@@ -64,6 +68,8 @@ public class StatusBar extends SettingsPreferenceFragment implements
|
||||
private SystemSettingSwitchPreference mBatteryTextCharging;
|
||||
private SystemSettingSwitchPreference mBluetoothBatteryStatus;
|
||||
private SystemSettingSwitchPreference mColoredIcons;
|
||||
private SystemSettingListPreference mLogoColor;
|
||||
private ColorPickerPreference mLogoColorPicker;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
@@ -93,6 +99,27 @@ public class StatusBar extends SettingsPreferenceFragment implements
|
||||
mQuickPulldown.setEntryValues(R.array.status_bar_quick_pull_down_values_rtl);
|
||||
}
|
||||
|
||||
mLogoColor = (SystemSettingListPreference) findPreference(LOGO_COLOR);
|
||||
int logoColor = Settings.System.getIntForUser(resolver,
|
||||
Settings.System.STATUS_BAR_LOGO_COLOR, 0, UserHandle.USER_CURRENT);
|
||||
mLogoColor.setValue(String.valueOf(logoColor));
|
||||
mLogoColor.setSummary(mLogoColor.getEntry());
|
||||
mLogoColor.setOnPreferenceChangeListener(this);
|
||||
|
||||
mLogoColorPicker = (ColorPickerPreference) findPreference(LOGO_COLOR_PICKER);
|
||||
int logoColorPicker = Settings.System.getInt(resolver,
|
||||
Settings.System.STATUS_BAR_LOGO_COLOR_PICKER, 0xFFFFFFFF);
|
||||
mLogoColorPicker.setNewPreviewColor(logoColorPicker);
|
||||
String logoColorPickerHex = String.format("#%08x", (0xFFFFFFFF & logoColorPicker));
|
||||
if (logoColorPickerHex.equals("#ffffffff")) {
|
||||
mLogoColorPicker.setSummary(R.string.default_string);
|
||||
} else {
|
||||
mLogoColorPicker.setSummary(logoColorPickerHex);
|
||||
}
|
||||
mLogoColorPicker.setOnPreferenceChangeListener(this);
|
||||
|
||||
updateColorPrefs(logoColor);
|
||||
|
||||
int batterystyle = Settings.System.getIntForUser(resolver,
|
||||
Settings.System.STATUS_BAR_BATTERY_STYLE, BATTERY_STYLE_PORTRAIT, UserHandle.USER_CURRENT);
|
||||
int batterypercent = Settings.System.getIntForUser(resolver,
|
||||
@@ -136,6 +163,26 @@ public class StatusBar extends SettingsPreferenceFragment implements
|
||||
mBatteryTextCharging.setEnabled(batterystyle == BATTERY_STYLE_HIDDEN ||
|
||||
(batterystyle != BATTERY_STYLE_TEXT && value != 2));
|
||||
return true;
|
||||
} else if (preference == mLogoColor) {
|
||||
int logoColor = Integer.valueOf((String) newValue);
|
||||
int index = mLogoColor.findIndexOfValue((String) newValue);
|
||||
Settings.System.putIntForUser(resolver,
|
||||
Settings.System.STATUS_BAR_LOGO_COLOR, logoColor, UserHandle.USER_CURRENT);
|
||||
mLogoColor.setSummary(mLogoColor.getEntries()[index]);
|
||||
updateColorPrefs(logoColor);
|
||||
return true;
|
||||
} else if (preference == mLogoColorPicker) {
|
||||
String hex = ColorPickerPreference.convertToARGB(
|
||||
Integer.valueOf(String.valueOf(newValue)));
|
||||
if (hex.equals("#ffffffff")) {
|
||||
preference.setSummary(R.string.default_string);
|
||||
} else {
|
||||
preference.setSummary(hex);
|
||||
}
|
||||
int intHex = ColorPickerPreference.convertToColorInt(hex);
|
||||
Settings.System.putInt(resolver,
|
||||
Settings.System.STATUS_BAR_LOGO_COLOR_PICKER, intHex);
|
||||
return true;
|
||||
} else if (preference == mColoredIcons) {
|
||||
SystemUtils.showSystemUiRestartDialog(context);
|
||||
return true;
|
||||
@@ -168,6 +215,12 @@ public class StatusBar extends SettingsPreferenceFragment implements
|
||||
mQuickPulldown.setSummary(summary);
|
||||
}
|
||||
|
||||
private void updateColorPrefs(int logoColor) {
|
||||
if (mLogoColor != null) {
|
||||
mLogoColorPicker.setEnabled(logoColor == 2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return MetricsEvent.EVOLVER;
|
||||
|
||||
Reference in New Issue
Block a user