Cherish: Ambient Edge Pulse Customizations [2/2]

This commit is contained in:
AnkitGourav
2019-12-21 13:15:43 +07:00
committed by Hưng Phan
parent 93ddf87c1f
commit c1a7e34994
5 changed files with 205 additions and 31 deletions

View File

@@ -629,4 +629,9 @@
<string name="pulse_ambient_light_title">Edge lighting</string>
<string name="pulse_ambient_light_summary">Light up the side edges of the screen on notification pulse</string>
<string name="pulse_ambient_light_color_title">Edge light color</string>
<string name="pulse_ambient_light_auto_color_title">Automatic color</string>
<string name="pulse_ambient_light_auto_color_summary">Sync color with wallpaper</string>
<string name="pulse_ambient_light_duration">Edge light pulse duration</string>
<string name="edgelight_left">Left Edge</string>
<string name="edgelight_right">Right Edge</string>
</resources>

View File

@@ -35,19 +35,13 @@
android:key="notification_screen"
android:title="@string/notification_screen_title" >
<com.cherish.settings.preferences.SystemSettingSwitchPreference
<com.cherish.settings.preferences.SystemSettingMasterSwitchPreference
android:key="pulse_ambient_light"
android:icon="@drawable/ic_pulse"
android:title="@string/pulse_ambient_light_title"
android:summary="@string/pulse_ambient_light_summary"
android:fragment="com.cherish.settings.fragments.EdgePulse"
android:defaultValue="false" />
<net.margaritov.preference.colorpicker.ColorPickerPreference
android:key="pulse_ambient_light_color"
android:title="@string/pulse_ambient_light_color_title"
android:persistent="false"
android:dependency="pulse_ambient_light"
settings:defaultColorValue="0xFF3980FF" />
</PreferenceCategory>

View File

@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2020 CherishOS
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"
android:title="@string/pulse_ambient_light_title"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
<PreferenceCategory
android:title="@string/edgelight_left" >
<com.cherish.settings.preferences.SystemSettingSwitchPreference
android:key="pulse_ambient_light_auto_color_left"
android:title="@string/pulse_ambient_light_auto_color_title"
android:summary="@string/pulse_ambient_light_auto_color_summary"
android:defaultValue="true"
android:disableDependentsState="true" />
<net.margaritov.preference.colorpicker.ColorPickerPreference
android:key="pulse_ambient_light_color_left"
android:title="@string/pulse_ambient_light_color_title"
android:persistent="false"
android:dependency="pulse_ambient_light_auto_color_left"
settings:defaultColorValue="0xFF3980FF" />
<com.cherish.settings.preferences.SystemSettingSeekBarPreference
android:key="pulse_ambient_light_left_duration"
android:title="@string/pulse_ambient_light_duration"
android:defaultValue="2000"
android:max="10000"
settings:min="500"
settings:interval="250"
settings:units="ms" />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/edgelight_right" >
<com.cherish.settings.preferences.SystemSettingSwitchPreference
android:key="pulse_ambient_light_auto_color_right"
android:title="@string/pulse_ambient_light_auto_color_title"
android:summary="@string/pulse_ambient_light_auto_color_summary"
android:defaultValue="true"
android:disableDependentsState="true" />
<net.margaritov.preference.colorpicker.ColorPickerPreference
android:key="pulse_ambient_light_color_right"
android:title="@string/pulse_ambient_light_color_title"
android:persistent="false"
android:dependency="pulse_ambient_light_auto_color_right"
settings:defaultColorValue="0xFF3980FF" />
<com.cherish.settings.preferences.SystemSettingSeekBarPreference
android:key="pulse_ambient_light_right_duration"
android:title="@string/pulse_ambient_light_duration"
android:defaultValue="2000"
android:max="10000"
settings:min="500"
settings:interval="250"
settings:units="ms" />
</PreferenceCategory>
</PreferenceScreen>