Cherish:QS header image [2/4]
This commit is contained in:
8
res/drawable/ic_header.xml
Normal file
8
res/drawable/ic_header.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<!-- drawable/page_layout_header.xml -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="24dp"
|
||||
android:width="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path android:fillColor="?android:attr/colorControlNormal" android:pathData="M6,2H18A2,2 0 0,1 20,4V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2M6,4V8H18V4H6Z" />
|
||||
</vector>
|
||||
@@ -553,4 +553,14 @@
|
||||
<item>9</item>
|
||||
<item>10</item>
|
||||
</string-array>
|
||||
|
||||
<!-- QS header image -->
|
||||
<string-array name="custom_header_provider_entries" translatable="false">
|
||||
<item>@string/daylight_header_provider_title</item>
|
||||
<item>@string/file_header_provider_title</item>
|
||||
</string-array>
|
||||
<string-array name="custom_header_provider_values" translatable="false">
|
||||
<item>@string/daylight_header_provider</item>
|
||||
<item>@string/file_header_provider</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
|
||||
@@ -606,4 +606,20 @@
|
||||
<string name="power_menu_animation_translucent_top">Translucent (top)</string>
|
||||
<string name="power_menu_animation_translucent_bottom">Translucent (bottom)</string>
|
||||
<string name="power_menu_animation_rotate">Rotate</string>
|
||||
|
||||
<!-- QS header image -->
|
||||
<string name="status_bar_custom_header_title">Header image</string>
|
||||
<string name="status_bar_custom_header_summary">Use a custom image for QS header</string>
|
||||
<string name="daylight_header_provider" translatable="false">daylight</string>
|
||||
<string name="file_header_provider" translatable="false">file</string>
|
||||
<string name="custom_header_provider_title">Image type</string>
|
||||
<string name="daylight_header_provider_title">Automatic (Time based)</string>
|
||||
<string name="file_header_provider_title">Static</string>
|
||||
<string name="daylight_header_pack_title">Image collection</string>
|
||||
<string name="header_provider_disabled">Disabled</string>
|
||||
<string name="custom_header_pick_title">Pick image from collection</string>
|
||||
<string name="custom_header_pick_summary">Select an image from pre-installed image collections</string>
|
||||
<string name="file_header_select_title">Pick image from storage</string>
|
||||
<string name="file_header_select_summary">Select an image from internal storage</string>
|
||||
<string name="status_bar_custom_header_shadow_title">Darken image</string>
|
||||
</resources>
|
||||
|
||||
@@ -68,6 +68,14 @@
|
||||
android:title="@string/enable_oneui"
|
||||
android:summary="@string/enable_oneui_summary"
|
||||
android:defaultValue="true" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingMasterSwitchPreference
|
||||
android:key="status_bar_custom_header"
|
||||
android:icon="@drawable/ic_header"
|
||||
android:fragment="com.cherish.settings.fragments.QsHeader"
|
||||
android:title="@string/status_bar_custom_header_title"
|
||||
android:summary="@string/status_bar_custom_header_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="footer_text_show"
|
||||
|
||||
58
res/xml/qs_header.xml
Normal file
58
res/xml/qs_header.xml
Normal file
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2020 ion-OS
|
||||
|
||||
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
|
||||
android:title="@string/status_bar_custom_header_title"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
|
||||
|
||||
<ListPreference
|
||||
android:key="custom_header_provider"
|
||||
android:title="@string/custom_header_provider_title"
|
||||
android:persistent="false"
|
||||
android:entries="@array/custom_header_provider_entries"
|
||||
android:entryValues="@array/custom_header_provider_values" />
|
||||
|
||||
<ListPreference
|
||||
android:key="daylight_header_pack"
|
||||
android:title="@string/daylight_header_pack_title"
|
||||
android:persistent="false" />
|
||||
|
||||
<Preference
|
||||
android:key="custom_header_browse"
|
||||
android:title="@string/custom_header_pick_title"
|
||||
android:summary="@string/custom_header_pick_summary"
|
||||
android:persistent="false" >
|
||||
<intent android:action="android.intent.action.MAIN"
|
||||
android:targetPackage="org.omnirom.omnistyle"
|
||||
android:targetClass="org.omnirom.omnistyle.PickHeaderActivity" />
|
||||
</Preference>
|
||||
|
||||
<Preference
|
||||
android:key="file_header_select"
|
||||
android:title="@string/file_header_select_title"
|
||||
android:summary="@string/file_header_select_summary"
|
||||
android:persistent="false" >
|
||||
</Preference>
|
||||
|
||||
<com.cherish.settings.preferences.CustomSeekBarPreference
|
||||
android:key="status_bar_custom_header_shadow"
|
||||
android:title="@string/status_bar_custom_header_shadow_title"
|
||||
android:max="100"
|
||||
settings:min="0"
|
||||
android:defaultValue="0"
|
||||
settings:units="%" />
|
||||
</PreferenceScreen>
|
||||
Reference in New Issue
Block a user