diff --git a/res/drawable/ic_sb_weather_icon.xml b/res/drawable/ic_sb_weather_icon.xml
new file mode 100644
index 0000000..d668767
--- /dev/null
+++ b/res/drawable/ic_sb_weather_icon.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
diff --git a/res/drawable/ic_sb_weather_icon_nav.xml b/res/drawable/ic_sb_weather_icon_nav.xml
new file mode 100644
index 0000000..75c379d
--- /dev/null
+++ b/res/drawable/ic_sb_weather_icon_nav.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
diff --git a/res/values/cherish_arrays.xml b/res/values/cherish_arrays.xml
index ff700f6..de2d1ad 100644
--- a/res/values/cherish_arrays.xml
+++ b/res/values/cherish_arrays.xml
@@ -1322,4 +1322,33 @@
- 9
- 10
+
+
+
+ - @string/status_bar_weather_hidden
+ - @string/status_bar_temperature_image_show_scale
+ - @string/status_bar_temperature_image_hide_scale
+ - @string/status_bar_temperature_show_scale_hide_image
+ - @string/status_bar_temperature_hide_scale_hide_image
+ - @string/status_bar_show_image
+
+
+
+ - 0
+ - 1
+ - 2
+ - 3
+ - 4
+ - 5
+
+
+
+ - @string/network_traffic_location_statusbar
+ - @string/network_traffic_location_quick_statusbar
+
+
+
+ - 0
+ - 1
+
diff --git a/res/values/cherish_strings.xml b/res/values/cherish_strings.xml
index 8213f50..b647b31 100644
--- a/res/values/cherish_strings.xml
+++ b/res/values/cherish_strings.xml
@@ -1272,4 +1272,19 @@
Background blur
Lock screen Blur cannot be enabled because your current lock screen wallpaper does not match your home screen one, or your device does not support Blur at all.
+
+
+ Status bar weather
+ Configure from QS settings/Weather.
+ Status bar weather style
+ Hidde weather
+ Show temp with scale and image
+ Show temp with image without scale
+ Show temp with scale
+ Show temp without scale
+ Location
+ Show image
+ Disabled
+ Statusbar
+ Quick Statusbar
diff --git a/res/xml/cherish_settings_statusbar.xml b/res/xml/cherish_settings_statusbar.xml
index ca70656..06793b8 100644
--- a/res/xml/cherish_settings_statusbar.xml
+++ b/res/xml/cherish_settings_statusbar.xml
@@ -39,6 +39,23 @@
android:summary="@string/clock_style_category_summary"
android:fragment="com.cherish.settings.fragments.ClockSettings" />
+
+
+
+
diff --git a/src/com/cherish/settings/fragments/StatusBarSettings.java b/src/com/cherish/settings/fragments/StatusBarSettings.java
index f396529..d1d8321 100644
--- a/src/com/cherish/settings/fragments/StatusBarSettings.java
+++ b/src/com/cherish/settings/fragments/StatusBarSettings.java
@@ -53,6 +53,9 @@ public class StatusBarSettings extends SettingsPreferenceFragment implements
private SystemSettingMasterSwitchPreference mStatusBarLogo;
private static final String PREF_KEY_CUTOUT = "cutout_settings";
+ private static final String PREF_STATUS_BAR_WEATHER = "status_bar_weather";
+
+ private ListPreference mStatusBarWeather;
@Override
public void onCreate(Bundle icicle) {
@@ -68,6 +71,19 @@ public class StatusBarSettings extends SettingsPreferenceFragment implements
mStatusBarLogo.setChecked((Settings.System.getInt(getActivity().getContentResolver(),
Settings.System.STATUS_BAR_LOGO, 0) == 1));
mStatusBarLogo.setOnPreferenceChangeListener(this);
+
+ // Status bar weather
+ mStatusBarWeather = (ListPreference) findPreference(PREF_STATUS_BAR_WEATHER);
+ int temperatureShow = Settings.System.getIntForUser(resolver,
+ Settings.System.STATUS_BAR_SHOW_WEATHER_TEMP, 0,
+ UserHandle.USER_CURRENT);
+ mStatusBarWeather.setValue(String.valueOf(temperatureShow));
+ if (temperatureShow == 0) {
+ mStatusBarWeather.setSummary(R.string.statusbar_weather_summary);
+ } else {
+ mStatusBarWeather.setSummary(mStatusBarWeather.getEntry());
+ }
+ mStatusBarWeather.setOnPreferenceChangeListener(this);
Preference mCutoutPref = (Preference) findPreference(PREF_KEY_CUTOUT);
@@ -85,6 +101,19 @@ public class StatusBarSettings extends SettingsPreferenceFragment implements
Settings.System.putInt(getActivity().getContentResolver(),
Settings.System.STATUS_BAR_LOGO, value ? 1 : 0);
return true;
+ } else if (preference == mStatusBarWeather) {
+ int temperatureShow = Integer.valueOf((String) objValue);
+ int index = mStatusBarWeather.findIndexOfValue((String) objValue);
+ Settings.System.putIntForUser(getActivity().getContentResolver(),
+ Settings.System.STATUS_BAR_SHOW_WEATHER_TEMP,
+ temperatureShow, UserHandle.USER_CURRENT);
+ if (temperatureShow == 0) {
+ mStatusBarWeather.setSummary(R.string.statusbar_weather_summary);
+ } else {
+ mStatusBarWeather.setSummary(
+ mStatusBarWeather.getEntries()[index]);
+ }
+ return true;
}
return false;
}