Cherish:Hide FOD if devices not supported

Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
Hưng Phan
2021-07-04 14:14:15 +07:00
parent 02e2156ffe
commit 2a8495d42f
5 changed files with 80 additions and 188 deletions

View File

@@ -269,13 +269,61 @@
android:entryValues="@array/lockscreen_albumart_filter_values"
android:dependency="lockscreen_media_metadata"
android:defaultValue="0" />
<!-- FOD Settings -->
<Preference
android:key="lockscreen_fod_category"
android:title="@string/lockscreen_fod_category"
android:icon="@drawable/ic_fingerprint"
android:summary="@string/fod_category_summary"
android:fragment="com.cherish.settings.fragments.lockscreen.FODSettings"/>
</PreferenceCategory>
<!-- FOD-->
<PreferenceCategory
android:key="fod_icon_picker"
android:title="@string/fod_icon_picker_category_title">
<Preference
android:key="fod_icon_picker_category"
android:title="@string/fod_icon_picker_title"
android:summary="@string/fod_icon_picker_summary"
android:fragment="com.cherish.settings.fragments.lockscreen.FODIconPickerFragment" />
<!-- Animated FOD icon -->
<com.cherish.settings.preferences.SystemSettingSwitchPreference
android:key="fod_icon_animation"
android:title="@string/fod_icon_animation"
android:summary="@string/fod_icon_animation_summary"
android:defaultValue="false" />
<com.cherish.settings.preferences.SystemSettingListPreference
android:key="fod_icon_anim_type"
android:title="@string/fod_icon_animation_effect_title"
android:summary="%s"
android:entries="@array/fod_icon_animation_entries"
android:entryValues="@array/fod_icon_animation_values"
android:defaultValue="0"
android:dependency="fod_icon_animation" />
<com.cherish.settings.preferences.SystemSettingListPreference
android:key="fod_color"
android:title="@string/fod_pressed_color_title"
android:summary="%s"
android:entries="@array/fod_pressed_color_entries"
android:entryValues="@array/fod_pressed_color_values"
android:defaultValue="0" />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/fod_recog_animation_category"
android:key="fod_animations">
<com.cherish.settings.preferences.SystemSettingSwitchPreference
android:key="fod_recognizing_animation"
android:title="@string/fod_recog_animation"
android:summary="@string/fod_recog_animation_summary"
android:defaultValue="false" />
<com.cherish.settings.preferences.SystemSettingListPreference
android:key="fod_anim"
android:title="@string/fod_recog_animation_effect_title"
android:summary="%s"
android:entries="@array/fod_recog_animation_entries"
android:entryValues="@array/fod_recog_animation_values"
android:defaultValue="0"
android:dependency="fod_recognizing_animation" />
</PreferenceCategory>
</PreferenceScreen>

View File

@@ -1,69 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2020-2021 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:key="fod_category"
android:title="@string/lockscreen_fod_category">
<!-- FOD icon picker -->
<Preference
android:key="fod_icon_picker_category"
android:title="@string/fod_icon_picker_title"
android:summary="@string/fod_icon_picker_summary"
android:fragment="com.cherish.settings.fragments.lockscreen.FODIconPickerFragment" />
<com.cherish.settings.preferences.SystemSettingSwitchPreference
android:key="fod_recognizing_animation"
android:title="@string/fod_recog_animation"
android:summary="@string/fod_recog_animation_summary"
android:defaultValue="false" />
<com.cherish.settings.preferences.SystemSettingListPreference
android:key="fod_anim"
android:title="@string/fod_recog_animation_effect_title"
android:summary="%s"
android:entries="@array/fod_recog_animation_entries"
android:entryValues="@array/fod_recog_animation_values"
android:defaultValue="0"
android:dependency="fod_recognizing_animation" />
<!-- Animated FOD icon -->
<com.cherish.settings.preferences.SystemSettingSwitchPreference
android:key="fod_icon_animation"
android:title="@string/fod_icon_animation"
android:summary="@string/fod_icon_animation_summary"
android:defaultValue="false" />
<com.cherish.settings.preferences.SystemSettingListPreference
android:key="fod_icon_anim_type"
android:title="@string/fod_icon_animation_effect_title"
android:summary="%s"
android:entries="@array/fod_icon_animation_entries"
android:entryValues="@array/fod_icon_animation_values"
android:defaultValue="0"
android:dependency="fod_icon_animation" />
<com.cherish.settings.preferences.SystemSettingListPreference
android:key="fod_color"
android:title="@string/fod_pressed_color_title"
android:summary="%s"
android:entries="@array/fod_pressed_color_entries"
android:entryValues="@array/fod_pressed_color_values"
android:defaultValue="0" />
</PreferenceScreen>