Revert "Cherish:Statusbar weather font color, size [2/2]"
This reverts commit346bd04b1e. Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com> Revert "[SQUASH]Cherish:Status bar weather [2/2]" This reverts commit8534a50c8b. Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2017 crDroid Android Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path android:fillColor="?android:attr/colorControlNormal"
|
||||
android:pathData="M22 17C22.5 17 23 17.5 23 18V22C23 22.5 22.5 23 22 23H17C16.5 23 16 22.5 16 22V18C16 17.5 16.5 17 17 17V15.5C17 14.1 18.1 13 19.5 13C20.9 13 22 14.1 22 15.5V17M21 17V15.5C21 14.7 20.3 14 19.5 14C18.7 14 18 14.7 18 15.5V17H21M19.36 9.03C21.95 9.22 24 11.36 24 14L23.94 14.77C23.59 12.63 21.74 11 19.5 11C17 11 15 13 15 15.5L15 15.76C14.39 16.31 14 17.11 14 18V19H6C2.69 19 0 16.31 0 13C0 9.9 2.34 7.36 5.35 7.04C6.6 4.64 9.11 3 12 3C15.64 3 18.67 5.59 19.36 9.03Z" />
|
||||
</vector>
|
||||
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2017 crDroid Android Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="80dp"
|
||||
android:height="80dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path android:fillColor="?android:attr/colorControlNormal"
|
||||
android:pathData="M22 17C22.5 17 23 17.5 23 18V22C23 22.5 22.5 23 22 23H17C16.5 23 16 22.5 16 22V18C16 17.5 16.5 17 17 17V15.5C17 14.1 18.1 13 19.5 13C20.9 13 22 14.1 22 15.5V17M21 17V15.5C21 14.7 20.3 14 19.5 14C18.7 14 18 14.7 18 15.5V17H21M19.36 9.03C21.95 9.22 24 11.36 24 14L23.94 14.77C23.59 12.63 21.74 11 19.5 11C17 11 15 13 15 15.5L15 15.76C14.39 16.31 14 17.11 14 18V19H6C2.69 19 0 16.31 0 13C0 9.9 2.34 7.36 5.35 7.04C6.6 4.64 9.11 3 12 3C15.64 3 18.67 5.59 19.36 9.03Z" />
|
||||
</vector>
|
||||
@@ -1215,35 +1215,6 @@
|
||||
<item>3</item>
|
||||
</string-array>
|
||||
|
||||
<!-- StatusBar weather settings -->
|
||||
<string-array name="status_bar_weather_entries" translatable="false">
|
||||
<item>@string/status_bar_weather_hidden</item>
|
||||
<item>@string/status_bar_temperature_image_show_scale</item>
|
||||
<item>@string/status_bar_temperature_image_hide_scale</item>
|
||||
<item>@string/status_bar_temperature_show_scale_hide_image</item>
|
||||
<item>@string/status_bar_temperature_hide_scale_hide_image</item>
|
||||
<item>@string/status_bar_show_image</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="status_bar_weather_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
<item>4</item>
|
||||
<item>5</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="weather_entries" translatable="false">
|
||||
<item>@string/network_traffic_location_statusbar</item>
|
||||
<item>@string/network_traffic_location_quick_statusbar</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="weather_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
</string-array>
|
||||
|
||||
<!-- System-wide Sliders Styles -->
|
||||
<string-array name="system_slider_style_entries" translatable="false">
|
||||
<item>@string/system_slider_style_default</item>
|
||||
|
||||
@@ -1162,23 +1162,6 @@
|
||||
<string name="alarm_blocker_warning_title">Proceed with caution</string>
|
||||
<string name="alarm_blocker_warning">Blocking alarms have the potential to cause instability, crashes or data loss.</string>
|
||||
|
||||
<!-- StatusBar weather settings -->
|
||||
<string name="statusbar_weather_title">Status bar weather</string>
|
||||
<string name="statusbar_weather_summary">Configure from QS settings/Weather.</string>
|
||||
<string name="statusbar_weather_dialog_title">Status bar weather style</string>
|
||||
<string name="status_bar_weather_hidden">Hidde weather</string>
|
||||
<string name="status_bar_temperature_image_show_scale">Show temp with scale and image</string>
|
||||
<string name="status_bar_temperature_image_hide_scale">Show temp with image without scale</string>
|
||||
<string name="status_bar_temperature_show_scale_hide_image">Show temp with scale</string>
|
||||
<string name="status_bar_temperature_hide_scale_hide_image">Show temp without scale</string>
|
||||
<string name="status_bar_weather_location_title">Location</string>
|
||||
<string name="status_bar_show_image">Show image</string>
|
||||
<string name="network_traffic_location_disable">Disabled</string>
|
||||
<string name="network_traffic_location_statusbar">Statusbar</string>
|
||||
<string name="network_traffic_location_quick_statusbar">Quick Statusbar</string>
|
||||
<string name="status_bar_weather_color_title">Temperature color</string>
|
||||
<string name="status_bar_weather_size_title">Font size</string>
|
||||
|
||||
<!-- Hide SB On Lockscreen -->
|
||||
<string name="hide_lockscreen_status_bar_title">Hide status bar</string>
|
||||
<string name="hide_lockscreen_status_bar_summary">Touch status bar to toggle visibility</string>
|
||||
@@ -1386,5 +1369,4 @@
|
||||
<string name="gaming_mode_danmaku_speed_vertical_title">Danmaku speed (vertical)</string>
|
||||
<string name="gaming_mode_danmaku_blacklist">Blacklist</string>
|
||||
<string name="gaming_mode_menu_opacity_title">Menu opacity level</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -39,37 +39,6 @@
|
||||
android:summary="@string/clock_style_category_summary"
|
||||
android:fragment="com.cherish.settings.fragments.ClockSettings" />
|
||||
|
||||
<ListPreference
|
||||
android:key="status_bar_weather"
|
||||
android:title="@string/statusbar_weather_title"
|
||||
android:dialogTitle="@string/statusbar_weather_dialog_title"
|
||||
android:entries="@array/status_bar_weather_entries"
|
||||
android:icon="@drawable/ic_sb_weather_icon"
|
||||
android:entryValues="@array/status_bar_weather_values" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingListPreference
|
||||
android:key="status_bar_show_weather_location"
|
||||
android:icon="@drawable/ic_sb_weather_icon_nav"
|
||||
android:title="@string/status_bar_weather_location_title"
|
||||
android:entries="@array/weather_entries"
|
||||
android:entryValues="@array/weather_values"
|
||||
android:summary="%s"
|
||||
android:defaultValue="0" />
|
||||
|
||||
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
||||
android:key="status_bar_weather_color"
|
||||
android:title="@string/status_bar_weather_color_title"
|
||||
android:defaultValue="0xffffffff" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSeekBarPreference
|
||||
android:key="status_bar_weather_font_size"
|
||||
android:title="@string/status_bar_weather_size_title"
|
||||
android:defaultValue="14"
|
||||
android:max="23"
|
||||
settings:min="4"
|
||||
settings:unitsLeft=""
|
||||
settings:unitsRight="dp" />
|
||||
|
||||
<Preference
|
||||
android:title="@string/statusbar_items_title"
|
||||
android:icon="@drawable/ic_shortcuts">
|
||||
|
||||
@@ -53,9 +53,6 @@ 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) {
|
||||
@@ -71,19 +68,6 @@ 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);
|
||||
|
||||
@@ -101,19 +85,6 @@ 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user