Cherish:Statusbar weather [2/2]

Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
LorDClockaN
2019-11-12 18:24:04 +05:30
committed by Hưng Phan
parent 59293d7ff4
commit 246c09b035
5 changed files with 182 additions and 0 deletions

View File

@@ -1339,4 +1339,33 @@
<item>@string/monet_5</item>
<item>@string/monet_6</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>
<!-- StatusBar Weather location -->
<string-array name="sb_weather_location_entries">
<item>@string/traffic_statusbar</item>
<item>@string/traffic_expanded_statusbar</item>
</string-array>
<string-array name="sb_weather_location_values" translatable="false">
<item>0</item>
<item>1</item>
</string-array>
</resources>

View File

@@ -1386,4 +1386,18 @@
<string name="status_bar_carrier_color">Carrier label color</string>
<string name="status_bar_carrier_size">Carrier label size</string>
<string name="status_bar_carrier_font_style_title">Carrier Label Font</string>
<!-- StatusBar weather settings -->
<string name="sb_weather_title">StatusBar Weather</string>
<string name="sb_weather_summary">config statusBar and qs weather</string>
<string name="status_bar_weather_location_title">Weather Placement</string>
<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">Hide 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_show_image">Show image</string>
</resources>

View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 The CherishOS 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.
-->
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
android:title="@string/sb_weather_title">
<com.cherish.settings.preferences.SystemSettingListPreference
android:key="status_bar_show_weather_temp"
android:title="@string/statusbar_weather_title"
android:dialogTitle="@string/statusbar_weather_dialog_title"
android:entries="@array/status_bar_weather_entries"
android:entryValues="@array/status_bar_weather_values"
android:summary="%s"
android:defaultValue="0" />
<com.cherish.settings.preferences.SystemSettingListPreference
android:key="status_bar_show_weather_location"
android:title="@string/status_bar_weather_location_title"
android:entries="@array/sb_weather_location_entries"
android:entryValues="@array/sb_weather_location_values"
android:summary="%s"
android:defaultValue="0" />
</PreferenceScreen>

View File

@@ -38,6 +38,14 @@
android:title="@string/clock_style_category_title"
android:summary="@string/clock_style_category_summary"
android:fragment="com.cherish.settings.fragments.ClockSettings" />
<!-- Status Bar Weather -->
<Preference
android:key="status_bar_weather"
android:icon="@drawable/ic_weather"
android:title="@string/sb_weather_title"
android:summary="@string/sb_weather_summary"
android:fragment="com.cherish.settings.fragments.SBWeather" />
<Preference
android:title="@string/statusbar_items_title"