Custom button light [2/2]

*DU Edits*

- Adapt to our custom seekbar
- Wrap preferences/seekbar with a category / update strings
- Add check to remove preferences depending on bool (config_button_brightness_support)

Change-Id: I90531723f8751a92766e96f5409d979a2f5bd524
Signed-off-by: SagarMakhar <sagarmakhar@gmail.com>
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
maxwen
2017-12-02 18:26:40 -05:00
committed by Hưng Phan
parent 6c28bcff30
commit 2960d8c445
3 changed files with 105 additions and 1 deletions

View File

@@ -39,6 +39,48 @@
android:title="@string/volume_steps_fragment_title"
android:summary="@string/volume_steps_summary"
android:fragment="com.cherish.settings.fragments.VolumeStepsFragment" />
</PreferenceCategory>
<PreferenceCategory
android:key="button_backlight_options_category"
android:title="@string/button_backlight_options_category" >
<com.cherish.settings.preferences.SystemSettingSwitchPreference
android:key="button_backlight_enable"
android:title="@string/button_backlight_enable_title"
android:defaultValue="true"/>
<com.cherish.settings.preferences.SystemSettingSwitchPreference
android:key="custom_button_use_screen_brightness"
android:title="@string/button_link_brightness"
android:summary="@string/button_link_brightness_summary"
android:defaultValue="false"
android:dependency="button_backlight_enable"
android:disableDependentsState="true" />
<com.cherish.settings.preferences.CustomSeekBarPreference
android:key="button_manual_brightness_new"
android:title="@string/button_manual_brightness"
android:max="255"
settings:min="1"
android:persistent="false"
android:dependency="custom_button_use_screen_brightness" />
<com.cherish.settings.preferences.CustomSeekBarPreference
android:key="button_timeout"
android:title="@string/button_timeout_title"
android:max="30"
settings:min="0"
android:persistent="false"
android:dependency="button_backlight_enable" />
<com.cherish.settings.preferences.SystemSettingSwitchPreference
android:key="button_backlight_on_touch_only"
android:title="@string/button_backlight_on_touch_only_title"
android:summary="@string/button_backlight_on_touch_only_summary"
android:defaultValue="false"
android:dependency="button_backlight_enable" />
</PreferenceCategory>
<PreferenceCategory