Add boolean for visibility of all settings at root level

This commit is contained in:
Benoit Marty 2022-02-23 18:19:24 +01:00
parent 830fca731c
commit 03a6a348c0
2 changed files with 55 additions and 11 deletions

View File

@ -1,11 +1,45 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<!-- Default preference values --> <!-- This file contains values to show or hide some settings, and default values for some settings -->
<!-- Level 0: Root -->
<bool name="settings_root_general_visible">true</bool>
<bool name="settings_root_notification_visible">true</bool>
<bool name="settings_root_preferences_visible">true</bool>
<bool name="settings_root_voice_video_visible">true</bool>
<bool name="settings_root_ignored_users_visible">true</bool>
<bool name="settings_root_security_privacy_visible">true</bool>
<bool name="settings_root_labs_visible">true</bool>
<bool name="settings_root_advanced_visible">true</bool>
<bool name="settings_root_help_about_visible">true</bool>
<bool name="settings_root_legals_visible">true</bool>
<!-- Level 1: General -->
<!-- Level 1: Notifications -->
<!-- Level 1: Preferences -->
<!-- If set to true, bubbles setting will be visible to the user in the preference --> <!-- If set to true, bubbles setting will be visible to the user in the preference -->
<bool name="settings_interface_bubble_visible">true</bool> <bool name="settings_interface_bubble_visible">true</bool>
<!-- If set to true, bubbles will be enabled by default --> <!-- If set to true, bubbles will be enabled by default -->
<bool name="settings_interface_bubble_default">false</bool> <bool name="settings_interface_bubble_default">false</bool>
<!-- Level 1: Voice and video -->
<!-- Level 1: Ignored Users -->
<!-- Level 1: Security and Privacy -->
<!-- Level 1: Labs -->
<!-- Level 1: Advcanced settings -->
<!-- Level 1: Help and about -->
<!-- Level 1: Legals -->
</resources> </resources>

View File

@ -5,7 +5,8 @@
<im.vector.app.core.preference.VectorPreference <im.vector.app.core.preference.VectorPreference
android:icon="@drawable/ic_settings_root_general" android:icon="@drawable/ic_settings_root_general"
android:title="@string/settings_general_title" android:title="@string/settings_general_title"
app:fragment="im.vector.app.features.settings.VectorSettingsGeneralFragment" /> app:fragment="im.vector.app.features.settings.VectorSettingsGeneralFragment"
app:isPreferenceVisible="@bool/settings_root_general_visible" />
<im.vector.app.core.preference.VectorPreference <im.vector.app.core.preference.VectorPreference
android:icon="@drawable/ic_settings_root_flair" android:icon="@drawable/ic_settings_root_flair"
@ -16,46 +17,55 @@
<im.vector.app.core.preference.VectorPreference <im.vector.app.core.preference.VectorPreference
android:icon="@drawable/ic_settings_root_notification" android:icon="@drawable/ic_settings_root_notification"
android:title="@string/settings_notifications" android:title="@string/settings_notifications"
app:fragment="im.vector.app.features.settings.notifications.VectorSettingsNotificationPreferenceFragment" /> app:fragment="im.vector.app.features.settings.notifications.VectorSettingsNotificationPreferenceFragment"
app:isPreferenceVisible="@bool/settings_root_notification_visible" />
<im.vector.app.core.preference.VectorPreference <im.vector.app.core.preference.VectorPreference
android:icon="@drawable/ic_settings_root_preferences" android:icon="@drawable/ic_settings_root_preferences"
android:title="@string/settings_preferences" android:title="@string/settings_preferences"
app:fragment="im.vector.app.features.settings.VectorSettingsPreferencesFragment" /> app:fragment="im.vector.app.features.settings.VectorSettingsPreferencesFragment"
app:isPreferenceVisible="@bool/settings_root_preferences_visible" />
<im.vector.app.core.preference.VectorPreference <im.vector.app.core.preference.VectorPreference
android:icon="@drawable/ic_settings_root_call" android:icon="@drawable/ic_settings_root_call"
android:title="@string/preference_voice_and_video" android:title="@string/preference_voice_and_video"
app:fragment="im.vector.app.features.settings.VectorSettingsVoiceVideoFragment" /> app:fragment="im.vector.app.features.settings.VectorSettingsVoiceVideoFragment"
app:isPreferenceVisible="@bool/settings_root_voice_video_visible" />
<im.vector.app.core.preference.VectorPreference <im.vector.app.core.preference.VectorPreference
android:icon="@drawable/ic_settings_root_ignored_users" android:icon="@drawable/ic_settings_root_ignored_users"
android:title="@string/settings_ignored_users" android:title="@string/settings_ignored_users"
app:fragment="im.vector.app.features.settings.ignored.VectorSettingsIgnoredUsersFragment" /> app:fragment="im.vector.app.features.settings.ignored.VectorSettingsIgnoredUsersFragment"
app:isPreferenceVisible="@bool/settings_root_ignored_users_visible" />
<im.vector.app.core.preference.VectorPreference <im.vector.app.core.preference.VectorPreference
android:icon="@drawable/ic_settings_root_security_privacy" android:icon="@drawable/ic_settings_root_security_privacy"
android:title="@string/settings_security_and_privacy" android:title="@string/settings_security_and_privacy"
app:fragment="im.vector.app.features.settings.VectorSettingsSecurityPrivacyFragment" /> app:fragment="im.vector.app.features.settings.VectorSettingsSecurityPrivacyFragment"
app:isPreferenceVisible="@bool/settings_root_security_privacy_visible" />
<im.vector.app.core.preference.VectorPreference <im.vector.app.core.preference.VectorPreference
android:icon="@drawable/ic_settings_root_labs" android:icon="@drawable/ic_settings_root_labs"
android:title="@string/room_settings_labs_pref_title" android:title="@string/room_settings_labs_pref_title"
app:fragment="im.vector.app.features.settings.VectorSettingsLabsFragment" /> app:fragment="im.vector.app.features.settings.VectorSettingsLabsFragment"
app:isPreferenceVisible="@bool/settings_root_labs_visible" />
<im.vector.app.core.preference.VectorPreference <im.vector.app.core.preference.VectorPreference
android:icon="@drawable/ic_settings_root_advanced" android:icon="@drawable/ic_settings_root_advanced"
android:title="@string/settings_advanced_settings" android:title="@string/settings_advanced_settings"
app:fragment="im.vector.app.features.settings.VectorSettingsAdvancedSettingsFragment" /> app:fragment="im.vector.app.features.settings.VectorSettingsAdvancedSettingsFragment"
app:isPreferenceVisible="@bool/settings_root_advanced_visible" />
<im.vector.app.core.preference.VectorPreference <im.vector.app.core.preference.VectorPreference
android:icon="@drawable/ic_settings_root_help_about" android:icon="@drawable/ic_settings_root_help_about"
android:title="@string/preference_root_help_about" android:title="@string/preference_root_help_about"
app:fragment="im.vector.app.features.settings.VectorSettingsHelpAboutFragment" /> app:fragment="im.vector.app.features.settings.VectorSettingsHelpAboutFragment"
app:isPreferenceVisible="@bool/settings_root_help_about_visible" />
<im.vector.app.core.preference.VectorPreference <im.vector.app.core.preference.VectorPreference
android:icon="@drawable/ic_settings_root_legals" android:icon="@drawable/ic_settings_root_legals"
android:title="@string/preference_root_legals" android:title="@string/preference_root_legals"
app:fragment="im.vector.app.features.settings.legals.LegalsFragment" /> app:fragment="im.vector.app.features.settings.legals.LegalsFragment"
app:isPreferenceVisible="@bool/settings_root_legals_visible" />
</androidx.preference.PreferenceScreen> </androidx.preference.PreferenceScreen>