Cherish:Add Weather Omni Customizations

Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
maxwen
2022-11-18 19:52:12 +07:00
committed by Hưng Phan
parent 68ff3a9cc0
commit 7695b0d745
5 changed files with 347 additions and 2 deletions

View File

@@ -772,4 +772,57 @@
<item>52</item>
<item>53</item>
</string-array>
<!-- KG/LAUNCHER Weather options -->
<string-array name="kg_launcher_weather_entries" translatable="false">
<item>@string/qs_weather_hidden</item>
<item>@string/qs_temperature_image_show_scale</item>
<item>@string/qs_temperature_image_hide_scale</item>
<item>@string/qs_temperature_show_scale_hide_image</item>
<item>@string/qs_temperature_hide_scale_hide_image</item>
<item>@string/qs_show_image</item>
<item>@string/weather_show_all_condition</item>
</string-array>
<string-array name="kg_launcher_weather_values" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
</string-array>
<!-- QS Weather options -->
<string-array name="qs_weather_entries" translatable="false">
<item>@string/qs_weather_hidden</item>
<item>@string/qs_temperature_image_show_scale</item>
<item>@string/qs_temperature_image_hide_scale</item>
<item>@string/qs_temperature_show_scale_hide_image</item>
<item>@string/qs_temperature_hide_scale_hide_image</item>
<item>@string/qs_show_image</item>
</string-array>
<string-array name="qs_weather_values" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
</string-array>
<!-- QS Weather positions -->
<string-array name="qsweather_position_entries" translatable="false">
<item>@string/qsweather_position_qqs</item>
<item>@string/qsweather_position_qsb</item>
<item>@string/qsweather_position_both</item>
</string-array>
<string-array name="qsweather_position_values" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
</resources>

View File

@@ -861,4 +861,37 @@
<string name="kg_custom_date_font_title">Custom lockscreen date font</string>
<string name="small_clock_doubleline_title">Double-line Lockscreen clock format</string>
<string name="small_clock_doubleline_summary">Use double-line clock instead of single line style for lockscreen clock</string>
<!-- QS Weather Options -->
<string name="qs_weather_title">QS System weather style</string>
<string name="qs_weather_summary">Configure system weather</string>
<string name="qsweather_dialog_title">QuickSettings weather location</string>
<string name="qs_weather_hidden">Hide weather</string>
<string name="qs_temperature_image_show_scale">Show temp with scale and image</string>
<string name="qs_temperature_image_hide_scale">Show temp with image without scale</string>
<string name="qs_temperature_show_scale_hide_image">Show temp with scale</string>
<string name="qs_temperature_hide_scale_hide_image">Show temp without scale</string>
<string name="qs_show_image">Show image</string>
<string name="weather_show_all_condition">Show temp with scale,image and weather condition</string>
<string name="qsweather_position_qqs">QuickSettings</string>
<string name="qsweather_position_qsb">QuickStatusbar</string>
<string name="qsweather_position_both">Both</string>
<!-- Launcher Weather Options -->
<string name="launcher_weather_title">Launcher System weather style</string>
<!-- Launcher Weather Options -->
<string name="kg_weather_title">Lockscreen System weather style</string>
<!-- Omni weather -->
<string name="qs_weather_settings_title">Weather Settings</string>
<string name="qs_weather_settings_summary">Setup icon pack and weather service</string>
<string name="weather_title">Weather Settings</string>
<string name="weather_config_title">Weather service</string>
<string name="weather_config_summary">System service settings</string>
<string name="weather_icon_pack_title">Condition icon pack</string>
<string name="weather_icon_pack_note">Note\u003a you can install new icon packs from play store by searching for \"Chronus icons\"</string>
<string name="weather_icon_pack_info_title">Tips\u003a \n\n1. Users can install new icon packs from play store by searching for \"Chronus icons\".\n\n2. Condition icon pack is used for weather icons on quick settings and sushi launcher at a glance.\n\n3. Long press the QuickSettings weather view/logo/temperature to access weather settings with ease.</string>
<string name="qsweather_settings_title">QuickSettings Weather</string>
<string name="qsweather_settings_summary">Setup quicksettings weather views</string>
</resources>

View File

@@ -73,8 +73,6 @@
android:title="@string/lock_screen_custom_clock_face_title"
android:entries="@array/lock_screen_custom_clock_face_entries"
android:entryValues="@array/lock_screen_custom_clock_face_values" />
</PreferenceCategory>
<SwitchPreference
android:key="kg_custom_clock_color_enabled"
@@ -107,6 +105,18 @@
android:title="@string/small_clock_doubleline_title"
android:summary="@string/small_clock_doubleline_summary"
android:defaultValue="false" />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/weather_title">
<Preference
android:key="omnijaws_settings"
android:title="@string/qs_weather_settings_title"
android:summary="@string/qs_weather_settings_summary"
android:fragment="com.cherish.settings.fragments.OmniJawsSettings" />
</PreferenceCategory>
<!-- Udfps options -->
<PreferenceCategory

View File

@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2017 The OmniROM Project
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:key="omnijaws_settings"
android:title="@string/weather_title">
<ListPreference
android:key="weather_icon_pack"
android:title="@string/weather_icon_pack_title"
android:persistent="false" />
<com.android.settingslib.widget.FooterPreference
android:title="@string/weather_icon_pack_info_title" />
<com.cherish.settings.preferences.SystemSettingListPreference
android:key="kg_show_weather_temp"
android:title="@string/kg_weather_title"
android:dialogTitle="@string/kg_weather_title"
android:entries="@array/kg_launcher_weather_entries"
android:summary="%s"
android:entryValues="@array/kg_launcher_weather_values" />
<com.cherish.settings.preferences.SystemSettingListPreference
android:key="qs_show_weather_temp"
android:title="@string/qs_weather_title"
android:dialogTitle="@string/qs_weather_title"
android:entries="@array/qs_weather_entries"
android:summary="%s"
android:entryValues="@array/qs_weather_values" />
<com.cherish.settings.preferences.SystemSettingListPreference
android:key="qs_weather_position"
android:title="@string/qsweather_dialog_title"
android:dialogTitle="@string/qsweather_dialog_title"
android:entries="@array/qsweather_position_entries"
android:summary="%s"
android:entryValues="@array/qsweather_position_values" />
<Preference
android:title="@string/weather_config_title"
android:summary="@string/weather_config_summary">
<intent
android:action="android.intent.action.MAIN"
android:targetPackage="org.omnirom.omnijaws"
android:targetClass="org.omnirom.omnijaws.SettingsActivityService" />
</Preference>
</PreferenceScreen>