split preference (XML)

This commit is contained in:
Benoit Marty 2019-06-26 15:26:08 +02:00
parent 8370f4fc76
commit e63f51821f
11 changed files with 561 additions and 520 deletions

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">

<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_GROUPS_FLAIR_KEY"
android:title="@string/settings_flair" />

<im.vector.riotredesign.core.preference.VectorPreferenceDivider />

</androidx.preference.PreferenceScreen>

View File

@ -0,0 +1,106 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">


<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_USER_SETTINGS_PREFERENCE_KEY"
android:title="@string/settings_user_settings">

<im.vector.riotredesign.core.preference.UserAvatarPreference
android:key="SETTINGS_PROFILE_PICTURE_PREFERENCE_KEY"
android:title="@string/settings_profile_picture" />

<im.vector.riotredesign.core.preference.VectorEditTextPreference
android:key="SETTINGS_DISPLAY_NAME_PREFERENCE_KEY"
android:summary="@string/settings_display_name"
android:title="@string/settings_display_name" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_CHANGE_PASSWORD_PREFERENCE_KEY"
android:summary="@string/password_hint"
android:title="@string/settings_password" />

<!-- Email will be added here -->

<!-- Note: inputType does not work, it is set also in code, as well as iconTint -->
<im.vector.riotredesign.core.preference.VectorEditTextPreference
android:icon="@drawable/ic_add_black"
android:inputType="textEmailAddress"
android:key="ADD_EMAIL_PREFERENCE_KEY"
android:order="100"
android:title="@string/settings_add_email_address"
app:iconTint="?attr/vctr_settings_icon_tint_color" />

<!-- Phone will be added here -->

<!-- Note: iconTint does not work, it is also done in code -->
<im.vector.riotredesign.core.preference.VectorPreference
android:icon="@drawable/ic_add_black"
android:key="ADD_PHONE_NUMBER_PREFERENCE_KEY"
android:order="200"
android:title="@string/settings_add_phone_number"
app:iconTint="?attr/vctr_settings_icon_tint_color" />

</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

<im.vector.riotredesign.core.preference.VectorPreferenceDivider />

<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_CONTACT_PREFERENCE_KEYS"
android:title="@string/settings_contact">

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="CONTACT_BOOK_ACCESS_KEY"
android:title="@string/settings_contacts_app_permission" />

<im.vector.riotredesign.core.preference.VectorPreference
android:dialogTitle="@string/settings_select_country"
android:key="SETTINGS_CONTACTS_PHONEBOOK_COUNTRY_PREFERENCE_KEY"
android:title="@string/settings_contacts_phonebook_country" />

</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

<im.vector.riotredesign.core.preference.VectorPreferenceDivider />

<im.vector.riotredesign.core.preference.VectorPreferenceCategory android:title="@string/settings_advanced">

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_LOGGED_IN_PREFERENCE_KEY"
android:title="@string/settings_logged_in"
tools:summary="\@user:matrix.org" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_HOME_SERVER_PREFERENCE_KEY"
android:title="@string/settings_home_server"
tools:summary="@string/default_hs_server_url" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_IDENTITY_SERVER_PREFERENCE_KEY"
android:title="@string/settings_identity_server"
tools:summary="@string/default_identity_server_url" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_CLEAR_MEDIA_CACHE_PREFERENCE_KEY"
android:title="@string/settings_clear_media_cache" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_CLEAR_CACHE_PREFERENCE_KEY"
android:title="@string/settings_clear_cache" />

</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

<im.vector.riotredesign.core.preference.VectorPreferenceDivider />

<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_DEACTIVATE_ACCOUNT_CATEGORY_KEY"
android:title="@string/settings_deactivate_account_section">

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_DEACTIVATE_ACCOUNT_KEY"
android:title="@string/settings_deactivate_my_account" />

</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

</androidx.preference.PreferenceScreen>

View File

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_OTHERS_PREFERENCE_KEY"
android:title="@string/settings_other">

<im.vector.riotredesign.core.preference.VectorPreference
android:key="APP_INFO_LINK_PREFERENCE_KEY"
android:summary="@string/settings_app_info_link_summary"
android:title="@string/settings_app_info_link_title" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_VERSION_PREFERENCE_KEY"
android:title="@string/settings_version"
tools:summary="1.2.3" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_SDK_VERSION_PREFERENCE_KEY"
android:title="@string/settings_sdk_version"
tools:summary="4.5.6" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_OLM_VERSION_PREFERENCE_KEY"
android:title="@string/settings_olm_version"
tools:summary="7.8.9" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_COPYRIGHT_PREFERENCE_KEY"
android:title="@string/settings_copyright" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_APP_TERM_CONDITIONS_PREFERENCE_KEY"
android:title="@string/settings_app_term_conditions" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_PRIVACY_POLICY_PREFERENCE_KEY"
android:title="@string/settings_privacy_policy" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_THIRD_PARTY_NOTICES_PREFERENCE_KEY"
android:title="@string/settings_third_party_notices" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_OTHER_THIRD_PARTY_NOTICES_PREFERENCE_KEY"
android:title="@string/settings_other_third_party_notices" />

</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

</androidx.preference.PreferenceScreen>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">

<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_IGNORED_USERS_PREFERENCE_KEY"
android:title="@string/settings_ignored_users" />

<im.vector.riotredesign.core.preference.VectorPreferenceDivider android:key="SETTINGS_IGNORE_USERS_DIVIDER_PREFERENCE_KEY" />


</androidx.preference.PreferenceScreen>

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">

<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_LABS_PREFERENCE_KEY"
android:title="@string/room_settings_labs_pref_title">

<im.vector.riotredesign.core.preference.VectorPreference
android:focusable="false"
android:key="labs_warning"
android:title="@string/room_settings_labs_warning_message" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="SETTINGS_ROOM_SETTINGS_LABS_END_TO_END_PREFERENCE_KEY"
android:title="@string/room_settings_labs_end_to_end" />

<im.vector.riotredesign.core.preference.VectorPreference
android:focusable="false"
android:key="SETTINGS_ROOM_SETTINGS_LABS_END_TO_END_IS_ACTIVE_PREFERENCE_KEY"
android:title="@string/room_settings_labs_end_to_end_is_active" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="SETTINGS_DATA_SAVE_MODE_PREFERENCE_KEY"
android:summary="@string/settings_data_save_mode_summary"
android:title="@string/settings_data_save_mode" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:defaultValue="true"
android:key="SETTINGS_USE_JITSI_CONF_PREFERENCE_KEY"
android:title="@string/settings_labs_create_conference_with_jitsi" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="SETTINGS_ENABLE_SEND_VOICE_FEATURE_PREFERENCE_KEY"
android:summary="@string/settings_labs_enable_send_voice_summary"
android:title="@string/settings_labs_enable_send_voice" />

</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

</androidx.preference.PreferenceScreen>

View File

@ -3,12 +3,12 @@
xmlns:app="http://schemas.android.com/apk/res-auto">

<!--<im.vector.riotredesign.core.preference.VectorSwitchPreference-->
<!--android:key="SETTINGS_ENABLE_ALL_NOTIF_PREFERENCE_KEY"-->
<!--android:title="@string/settings_enable_all_notif" />-->
<!--android:key="SETTINGS_ENABLE_ALL_NOTIF_PREFERENCE_KEY"-->
<!--android:title="@string/settings_enable_all_notif" />-->

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="SETTINGS_ENABLE_THIS_DEVICE_PREFERENCE_KEY"
android:defaultValue="true"
android:key="SETTINGS_ENABLE_THIS_DEVICE_PREFERENCE_KEY"
android:title="@string/settings_enable_this_device" />
<!--android:dependency="SETTINGS_ENABLE_ALL_NOTIF_PREFERENCE_KEY"-->

@ -24,12 +24,12 @@

<im.vector.riotredesign.core.preference.VectorPreference
android:dependency="SETTINGS_ENABLE_THIS_DEVICE_PREFERENCE_KEY"
android:enabled="false"
android:key="SETTINGS_NOTIFICATION_ADVANCED_PREFERENCE_KEY"
android:persistent="false"
android:visibility="gone"
android:summary="@string/settings_notification_advanced_summary"
android:title="@string/settings_notification_advanced"
android:enabled="false"
android:visibility="gone"
app:fragment="im.vector.fragments.VectorSettingsNotificationsAdvancedFragment" />

<im.vector.riotredesign.core.preference.VectorPreference
@ -37,18 +37,94 @@
android:title="@string/settings_notification_troubleshoot"
app:fragment="im.vector.riotredesign.features.settings.VectorSettingsNotificationsTroubleshootFragment" />


<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_NOTIFICATIONS_KEY"
android:title="@string/settings_notifications">

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="SETTINGS_ENABLE_ALL_NOTIF_PREFERENCE_KEY"
android:title="@string/settings_enable_all_notif" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:dependency="SETTINGS_ENABLE_ALL_NOTIF_PREFERENCE_KEY"
android:key="SETTINGS_ENABLE_THIS_DEVICE_PREFERENCE_KEY"
android:title="@string/settings_enable_this_device" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:dependency="SETTINGS_ENABLE_ALL_NOTIF_PREFERENCE_KEY"
android:key="SETTINGS_TURN_SCREEN_ON_PREFERENCE_KEY"
android:title="@string/settings_turn_screen_on" />

<im.vector.riotredesign.core.preference.VectorPreference
android:dialogTitle="@string/settings_notification_privacy"
android:key="SETTINGS_NOTIFICATION_PRIVACY_PREFERENCE_KEY"
android:title="@string/settings_notification_privacy" />

<im.vector.riotredesign.core.preference.VectorPreference
android:dependency="SETTINGS_ENABLE_THIS_DEVICE_PREFERENCE_KEY"
android:key="SETTINGS_NOTIFICATION_ADVANCED_PREFERENCE_KEY"
android:persistent="false"
android:summary="@string/settings_notification_advanced_summary"
android:title="@string/settings_notification_advanced"
app:fragment="im.vector.fragments.VectorSettingsNotificationsAdvancedFragment" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_NOTIFICATION_TROUBLESHOOT_PREFERENCE_KEY"
android:title="@string/settings_notification_troubleshoot"
app:fragment="im.vector.riotredesign.features.settings.VectorSettingsNotificationsTroubleshootFragment" />

</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

<im.vector.riotredesign.core.preference.VectorPreferenceDivider />

<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_BACKGROUND_SYNC_PREFERENCE_KEY"
android:title="@string/settings_background_sync">

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:defaultValue="true"
android:key="SETTINGS_START_ON_BOOT_PREFERENCE_KEY"
android:title="@string/settings_start_on_boot" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="SETTINGS_ENABLE_BACKGROUND_SYNC_PREFERENCE_KEY"
android:title="@string/settings_enable_background_sync" />

<im.vector.riotredesign.core.preference.VectorEditTextPreference
android:dependency="SETTINGS_ENABLE_BACKGROUND_SYNC_PREFERENCE_KEY"
android:key="SETTINGS_SET_SYNC_TIMEOUT_PREFERENCE_KEY"
android:numeric="integer"
android:title="@string/settings_set_sync_timeout" />

<im.vector.riotredesign.core.preference.VectorEditTextPreference
android:dependency="SETTINGS_ENABLE_BACKGROUND_SYNC_PREFERENCE_KEY"
android:key="SETTINGS_SET_SYNC_DELAY_PREFERENCE_KEY"
android:numeric="integer"
android:title="@string/settings_set_sync_delay" />

</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

<im.vector.riotredesign.core.preference.VectorPreferenceDivider android:key="SETTINGS_BACKGROUND_SYNC_DIVIDER_PREFERENCE_KEY" />

<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_NOTIFICATIONS_TARGETS_PREFERENCE_KEY"
android:title="@string/settings_notifications_targets" />

<im.vector.riotredesign.core.preference.VectorPreferenceDivider android:key="SETTINGS_NOTIFICATIONS_TARGET_DIVIDER_PREFERENCE_KEY" />

<PreferenceCategory android:title="@string/settings_expert">

<im.vector.riotredesign.core.preference.VectorPreference
android:layout_width="match_parent"
android:title="@string/settings_notifications_targets"
android:persistent="false"
android:title="@string/settings_notifications_targets"
app:fragment="im.vector.riotredesign.features.settings.push.PushGatewaysFragment" />

<im.vector.riotredesign.core.preference.VectorPreference
android:layout_width="match_parent"
android:title="@string/settings_push_rules"
android:persistent="false"
android:title="@string/settings_push_rules"
app:fragment="im.vector.riotredesign.features.settings.push.PushRulesFragment" />

</PreferenceCategory>

View File

@ -1,513 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">

<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_USER_SETTINGS_PREFERENCE_KEY"
android:title="@string/settings_user_settings">

<im.vector.riotredesign.core.preference.UserAvatarPreference
android:key="SETTINGS_PROFILE_PICTURE_PREFERENCE_KEY"
android:title="@string/settings_profile_picture" />

<im.vector.riotredesign.core.preference.VectorEditTextPreference
android:key="SETTINGS_DISPLAY_NAME_PREFERENCE_KEY"
android:summary="@string/settings_display_name"
android:title="@string/settings_display_name" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_CHANGE_PASSWORD_PREFERENCE_KEY"
android:summary="@string/password_hint"
android:title="@string/settings_password" />

<!-- Email will be added here -->

<!-- Note: inputType does not work, it is set also in code, as well as iconTint -->
<im.vector.riotredesign.core.preference.VectorEditTextPreference
android:icon="@drawable/ic_add_black"
android:inputType="textEmailAddress"
android:key="ADD_EMAIL_PREFERENCE_KEY"
android:order="100"
android:title="@string/settings_add_email_address"
app:iconTint="?attr/vctr_settings_icon_tint_color" />

<!-- Phone will be added here -->

<!-- Note: iconTint does not work, it is also done in code -->
<im.vector.riotredesign.core.preference.VectorPreference
android:icon="@drawable/ic_add_black"
android:key="ADD_PHONE_NUMBER_PREFERENCE_KEY"
android:order="200"
android:title="@string/settings_add_phone_number"
app:iconTint="?attr/vctr_settings_icon_tint_color" />

</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

<im.vector.riotredesign.core.preference.VectorPreferenceDivider />

<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_CONTACT_PREFERENCE_KEYS"
android:title="@string/settings_contact">

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="CONTACT_BOOK_ACCESS_KEY"
android:title="@string/settings_contacts_app_permission" />

<im.vector.riotredesign.core.preference.VectorPreference
android:dialogTitle="@string/settings_select_country"
android:key="SETTINGS_CONTACTS_PHONEBOOK_COUNTRY_PREFERENCE_KEY"
android:title="@string/settings_contacts_phonebook_country" />

</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

<im.vector.riotredesign.core.preference.VectorPreferenceDivider />

<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_USER_INTERFACE_KEY"
android:title="@string/settings_user_interface">

<im.vector.riotredesign.core.preference.VectorPreference
android:dialogTitle="@string/settings_select_language"
android:key="SETTINGS_INTERFACE_LANGUAGE_PREFERENCE_KEY"
android:title="@string/settings_interface_language" />

<im.vector.riotredesign.core.preference.VectorListPreference
android:entries="@array/theme_entries"
android:entryValues="@array/theme_values"
android:key="APPLICATION_THEME_KEY"
android:summary="%s"
android:title="@string/settings_theme"
app:iconSpaceReserved="false" />

<im.vector.riotredesign.core.preference.VectorPreference
android:dialogTitle="@string/font_size"
android:key="SETTINGS_INTERFACE_TEXT_SIZE_KEY"
android:title="@string/font_size" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:defaultValue="true"
android:key="SETTINGS_SHOW_URL_PREVIEW_KEY"
android:summary="@string/settings_inline_url_preview_summary"
android:title="@string/settings_inline_url_preview" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:defaultValue="true"
android:key="SETTINGS_SEND_TYPING_NOTIF_KEY"
android:summary="@string/settings_send_typing_notifs_summary"
android:title="@string/settings_send_typing_notifs" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:defaultValue="true"
android:key="SETTINGS_ENABLE_MARKDOWN_KEY"
android:summary="@string/settings_send_markdown_summary"
android:title="@string/settings_send_markdown" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="SETTINGS_ALWAYS_SHOW_TIMESTAMPS_KEY"
android:title="@string/settings_always_show_timestamps" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="SETTINGS_12_24_TIMESTAMPS_KEY"
android:title="@string/settings_12_24_timestamps" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:defaultValue="true"
android:key="SETTINGS_SHOW_READ_RECEIPTS_KEY"
android:summary="@string/settings_show_read_receipts_summary"
android:title="@string/settings_show_read_receipts" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:defaultValue="true"
android:key="SETTINGS_SHOW_JOIN_LEAVE_MESSAGES_KEY"
android:summary="@string/settings_show_join_leave_messages_summary"
android:title="@string/settings_show_join_leave_messages" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:defaultValue="true"
android:key="SETTINGS_SHOW_AVATAR_DISPLAY_NAME_CHANGES_MESSAGES_KEY"
android:summary="@string/settings_show_avatar_display_name_changes_messages_summary"
android:title="@string/settings_show_avatar_display_name_changes_messages" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="SETTINGS_VIBRATE_ON_MENTION_KEY"
android:title="@string/settings_vibrate_on_mention" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="SETTINGS_SEND_MESSAGE_WITH_ENTER"
android:summary="@string/settings_send_message_with_enter_summary"
android:title="@string/settings_send_message_with_enter" />

<im.vector.riotredesign.core.preference.VectorListPreference
android:defaultValue="always"
android:entries="@array/show_info_area_entries"
android:entryValues="@array/show_info_area_values"
android:key="SETTINGS_SHOW_INFO_AREA_KEY"
android:summary="%s"
android:title="@string/settings_info_area_show" />

</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

<im.vector.riotredesign.core.preference.VectorPreferenceDivider />

<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_HOME_DISPLAY_KEY"
android:title="@string/settings_home_display">

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:defaultValue="true"
android:key="SETTINGS_PIN_MISSED_NOTIFICATIONS_PREFERENCE_KEY"
android:title="@string/settings_pin_missed_notifications" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:defaultValue="true"
android:key="SETTINGS_PIN_UNREAD_MESSAGES_PREFERENCE_KEY"
android:title="@string/settings_pin_unread_messages" />

</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

<im.vector.riotredesign.core.preference.VectorPreferenceDivider />

<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_GROUPS_FLAIR_KEY"
android:title="@string/settings_flair" />

<im.vector.riotredesign.core.preference.VectorPreferenceDivider />

<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_NOTIFICATIONS_KEY"
android:title="@string/settings_notifications">

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="SETTINGS_ENABLE_ALL_NOTIF_PREFERENCE_KEY"
android:title="@string/settings_enable_all_notif" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:dependency="SETTINGS_ENABLE_ALL_NOTIF_PREFERENCE_KEY"
android:key="SETTINGS_ENABLE_THIS_DEVICE_PREFERENCE_KEY"
android:title="@string/settings_enable_this_device" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:dependency="SETTINGS_ENABLE_ALL_NOTIF_PREFERENCE_KEY"
android:key="SETTINGS_TURN_SCREEN_ON_PREFERENCE_KEY"
android:title="@string/settings_turn_screen_on" />

<im.vector.riotredesign.core.preference.VectorPreference
android:dialogTitle="@string/settings_notification_privacy"
android:key="SETTINGS_NOTIFICATION_PRIVACY_PREFERENCE_KEY"
android:title="@string/settings_notification_privacy" />

<im.vector.riotredesign.core.preference.VectorPreference
android:dependency="SETTINGS_ENABLE_THIS_DEVICE_PREFERENCE_KEY"
android:key="SETTINGS_NOTIFICATION_ADVANCED_PREFERENCE_KEY"
android:persistent="false"
android:summary="@string/settings_notification_advanced_summary"
android:title="@string/settings_notification_advanced"
app:fragment="im.vector.fragments.VectorSettingsNotificationsAdvancedFragment" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_NOTIFICATION_TROUBLESHOOT_PREFERENCE_KEY"
android:title="@string/settings_notification_troubleshoot"
app:fragment="im.vector.riotredesign.features.settings.VectorSettingsNotificationsTroubleshootFragment" />

</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

<im.vector.riotredesign.core.preference.VectorPreferenceDivider />

<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_BACKGROUND_SYNC_PREFERENCE_KEY"
android:title="@string/settings_background_sync">

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:defaultValue="true"
android:key="SETTINGS_START_ON_BOOT_PREFERENCE_KEY"
android:title="@string/settings_start_on_boot" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="SETTINGS_ENABLE_BACKGROUND_SYNC_PREFERENCE_KEY"
android:title="@string/settings_enable_background_sync" />

<im.vector.riotredesign.core.preference.VectorEditTextPreference
android:dependency="SETTINGS_ENABLE_BACKGROUND_SYNC_PREFERENCE_KEY"
android:key="SETTINGS_SET_SYNC_TIMEOUT_PREFERENCE_KEY"
android:numeric="integer"
android:title="@string/settings_set_sync_timeout" />

<im.vector.riotredesign.core.preference.VectorEditTextPreference
android:dependency="SETTINGS_ENABLE_BACKGROUND_SYNC_PREFERENCE_KEY"
android:key="SETTINGS_SET_SYNC_DELAY_PREFERENCE_KEY"
android:numeric="integer"
android:title="@string/settings_set_sync_delay" />

</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

<im.vector.riotredesign.core.preference.VectorPreferenceDivider android:key="SETTINGS_BACKGROUND_SYNC_DIVIDER_PREFERENCE_KEY" />

<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_NOTIFICATIONS_TARGETS_PREFERENCE_KEY"
android:title="@string/settings_notifications_targets" />

<im.vector.riotredesign.core.preference.VectorPreferenceDivider android:key="SETTINGS_NOTIFICATIONS_TARGET_DIVIDER_PREFERENCE_KEY" />

<im.vector.riotredesign.core.preference.VectorPreferenceCategory android:title="@string/settings_media">

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="SETTINGS_USE_NATIVE_CAMERA_PREFERENCE_KEY"
android:summary="@string/settings_labs_native_camera_summary"
android:title="@string/settings_labs_native_camera" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:defaultValue="true"
android:key="SETTINGS_PLAY_SHUTTER_SOUND_KEY"

android:title="@string/settings_play_shutter_sound" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="SETTINGS_PREVIEW_MEDIA_BEFORE_SENDING_KEY"
android:title="@string/settings_preview_media_before_sending" />

<im.vector.riotredesign.core.preference.VectorListPreference
android:defaultValue="0"
android:entries="@array/compression_levels"
android:entryValues="@array/compression_level_values"
android:key="SETTINGS_DEFAULT_MEDIA_COMPRESSION_KEY"
android:summary="%s"
android:title="@string/settings_default_compression" />

<im.vector.riotredesign.core.preference.VectorListPreference
android:defaultValue="0"
android:entries="@array/media_sources"
android:entryValues="@array/media_source_values"
android:key="SETTINGS_DEFAULT_MEDIA_SOURCE_KEY"
android:summary="%s"
android:title="@string/settings_default_media_source" />

</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

<im.vector.riotredesign.core.preference.VectorPreferenceDivider />

<im.vector.riotredesign.core.preference.VectorPreferenceCategory android:title="@string/settings_call_category">

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:defaultValue="true"
android:disableDependentsState="true"
android:key="SETTINGS_CALL_RINGTONE_USE_RIOT_PREFERENCE_KEY"
android:title="@string/settings_call_ringtone_use_riot_ringtone" />

<im.vector.riotredesign.core.preference.VectorPreference
android:dependency="SETTINGS_CALL_RINGTONE_USE_RIOT_PREFERENCE_KEY"
android:key="SETTINGS_CALL_RINGTONE_URI_PREFERENCE_KEY"
android:title="@string/settings_call_ringtone_title" />

</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

<im.vector.riotredesign.core.preference.VectorPreferenceDivider />

<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_IGNORED_USERS_PREFERENCE_KEY"
android:title="@string/settings_ignored_users" />

<im.vector.riotredesign.core.preference.VectorPreferenceDivider android:key="SETTINGS_IGNORE_USERS_DIVIDER_PREFERENCE_KEY" />

<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_LABS_PREFERENCE_KEY"
android:title="@string/room_settings_labs_pref_title">

<im.vector.riotredesign.core.preference.VectorPreference
android:focusable="false"
android:key="labs_warning"
android:title="@string/room_settings_labs_warning_message" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="SETTINGS_ROOM_SETTINGS_LABS_END_TO_END_PREFERENCE_KEY"
android:title="@string/room_settings_labs_end_to_end" />

<im.vector.riotredesign.core.preference.VectorPreference
android:focusable="false"
android:key="SETTINGS_ROOM_SETTINGS_LABS_END_TO_END_IS_ACTIVE_PREFERENCE_KEY"
android:title="@string/room_settings_labs_end_to_end_is_active" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="SETTINGS_DATA_SAVE_MODE_PREFERENCE_KEY"
android:summary="@string/settings_data_save_mode_summary"
android:title="@string/settings_data_save_mode" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:defaultValue="true"
android:key="SETTINGS_USE_JITSI_CONF_PREFERENCE_KEY"
android:title="@string/settings_labs_create_conference_with_jitsi" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="SETTINGS_ENABLE_SEND_VOICE_FEATURE_PREFERENCE_KEY"
android:summary="@string/settings_labs_enable_send_voice_summary"
android:title="@string/settings_labs_enable_send_voice" />

</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

<im.vector.riotredesign.core.preference.VectorPreferenceDivider />

<!-- ************ Cryptography section ************ -->
<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_CRYPTOGRAPHY_PREFERENCE_KEY"
android:title="@string/settings_cryptography">

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_ENCRYPTION_INFORMATION_DEVICE_NAME_PREFERENCE_KEY"
android:title="@string/encryption_information_device_name" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_ENCRYPTION_INFORMATION_DEVICE_ID_PREFERENCE_KEY"
android:title="@string/encryption_information_device_id" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_ENCRYPTION_INFORMATION_DEVICE_KEY_PREFERENCE_KEY"
android:title="@string/encryption_information_device_key" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="SETTINGS_ENCRYPTION_NEVER_SENT_TO_PREFERENCE_KEY"
android:summary="@string/encryption_never_send_to_unverified_devices_summary"
android:title="@string/encryption_never_send_to_unverified_devices_title" />

</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

<im.vector.riotredesign.core.preference.VectorPreferenceDivider android:key="SETTINGS_CRYPTOGRAPHY_DIVIDER_PREFERENCE_KEY" />

<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_CRYPTOGRAPHY_MANAGE_PREFERENCE_KEY"
android:title="@string/settings_cryptography_manage_keys">

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_SECURE_MESSAGE_RECOVERY_PREFERENCE_KEY"
android:persistent="false"
android:summary="@string/encryption_settings_manage_message_recovery_summary"
android:title="@string/encryption_message_recovery" />
<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_ENCRYPTION_EXPORT_E2E_ROOM_KEYS_PREFERENCE_KEY"
android:summary="@string/encryption_export_room_keys_summary"
android:title="@string/encryption_export_e2e_room_keys" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_ENCRYPTION_IMPORT_E2E_ROOM_KEYS_PREFERENCE_KEY"
android:summary="@string/encryption_import_room_keys_summary"
android:title="@string/encryption_import_e2e_room_keys" />

</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

<im.vector.riotredesign.core.preference.VectorPreferenceDivider android:key="SETTINGS_CRYPTOGRAPHY_MANAGE_DIVIDER_PREFERENCE_KEY" />

<!-- devices list: device ids + device names -->
<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_DEVICES_LIST_PREFERENCE_KEY"
android:title="@string/settings_devices_list" />

<im.vector.riotredesign.core.preference.VectorPreferenceDivider android:key="SETTINGS_DEVICES_DIVIDER_PREFERENCE_KEY" />

<im.vector.riotredesign.core.preference.VectorPreferenceCategory android:title="@string/settings_advanced">

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_LOGGED_IN_PREFERENCE_KEY"
android:title="@string/settings_logged_in"
tools:summary="\@user:matrix.org" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_HOME_SERVER_PREFERENCE_KEY"
android:title="@string/settings_home_server"
tools:summary="@string/default_hs_server_url" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_IDENTITY_SERVER_PREFERENCE_KEY"
android:title="@string/settings_identity_server"
tools:summary="@string/default_identity_server_url" />

</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

<im.vector.riotredesign.core.preference.VectorPreferenceDivider />

<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_ANALYTICS_PREFERENCE_KEY"
android:title="@string/settings_analytics">

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:defaultValue="false"
android:key="SETTINGS_USE_ANALYTICS_KEY"
android:summary="@string/settings_opt_in_of_analytics_summary"
android:title="@string/settings_opt_in_of_analytics" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="SETTINGS_USE_RAGE_SHAKE_KEY"
android:title="@string/send_bug_report_rage_shake" />
</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

<im.vector.riotredesign.core.preference.VectorPreferenceDivider />

<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_OTHERS_PREFERENCE_KEY"
android:title="@string/settings_other">

<im.vector.riotredesign.core.preference.VectorPreference
android:key="APP_INFO_LINK_PREFERENCE_KEY"
android:summary="@string/settings_app_info_link_summary"
android:title="@string/settings_app_info_link_title" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_VERSION_PREFERENCE_KEY"
android:title="@string/settings_version"
tools:summary="1.2.3" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_SDK_VERSION_PREFERENCE_KEY"
android:title="@string/settings_sdk_version"
tools:summary="4.5.6" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_OLM_VERSION_PREFERENCE_KEY"
android:title="@string/settings_olm_version"
tools:summary="7.8.9" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_COPYRIGHT_PREFERENCE_KEY"
android:title="@string/settings_copyright" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_APP_TERM_CONDITIONS_PREFERENCE_KEY"
android:title="@string/settings_app_term_conditions" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_PRIVACY_POLICY_PREFERENCE_KEY"
android:title="@string/settings_privacy_policy" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_THIRD_PARTY_NOTICES_PREFERENCE_KEY"
android:title="@string/settings_third_party_notices" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_OTHER_THIRD_PARTY_NOTICES_PREFERENCE_KEY"
android:title="@string/settings_other_third_party_notices" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_MEDIA_SAVING_PERIOD_KEY"
android:title="@string/settings_keep_media" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_CLEAR_MEDIA_CACHE_PREFERENCE_KEY"
android:title="@string/settings_clear_media_cache" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_CLEAR_CACHE_PREFERENCE_KEY"
android:title="@string/settings_clear_cache" />

</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

<im.vector.riotredesign.core.preference.VectorPreferenceDivider />

<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_DEACTIVATE_ACCOUNT_CATEGORY_KEY"
android:title="@string/settings_deactivate_account_section">

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_DEACTIVATE_ACCOUNT_KEY"
android:title="@string/settings_deactivate_my_account" />

</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

</androidx.preference.PreferenceScreen>

View File

@ -0,0 +1,150 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">


<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_USER_INTERFACE_KEY"
android:title="@string/settings_user_interface">

<im.vector.riotredesign.core.preference.VectorPreference
android:dialogTitle="@string/settings_select_language"
android:key="SETTINGS_INTERFACE_LANGUAGE_PREFERENCE_KEY"
android:title="@string/settings_interface_language" />

<im.vector.riotredesign.core.preference.VectorListPreference
android:entries="@array/theme_entries"
android:entryValues="@array/theme_values"
android:key="APPLICATION_THEME_KEY"
android:summary="%s"
android:title="@string/settings_theme"
app:iconSpaceReserved="false" />

<im.vector.riotredesign.core.preference.VectorPreference
android:dialogTitle="@string/font_size"
android:key="SETTINGS_INTERFACE_TEXT_SIZE_KEY"
android:title="@string/font_size" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:defaultValue="true"
android:key="SETTINGS_SHOW_URL_PREVIEW_KEY"
android:summary="@string/settings_inline_url_preview_summary"
android:title="@string/settings_inline_url_preview" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:defaultValue="true"
android:key="SETTINGS_SEND_TYPING_NOTIF_KEY"
android:summary="@string/settings_send_typing_notifs_summary"
android:title="@string/settings_send_typing_notifs" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:defaultValue="true"
android:key="SETTINGS_ENABLE_MARKDOWN_KEY"
android:summary="@string/settings_send_markdown_summary"
android:title="@string/settings_send_markdown" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="SETTINGS_ALWAYS_SHOW_TIMESTAMPS_KEY"
android:title="@string/settings_always_show_timestamps" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="SETTINGS_12_24_TIMESTAMPS_KEY"
android:title="@string/settings_12_24_timestamps" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:defaultValue="true"
android:key="SETTINGS_SHOW_READ_RECEIPTS_KEY"
android:summary="@string/settings_show_read_receipts_summary"
android:title="@string/settings_show_read_receipts" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:defaultValue="true"
android:key="SETTINGS_SHOW_JOIN_LEAVE_MESSAGES_KEY"
android:summary="@string/settings_show_join_leave_messages_summary"
android:title="@string/settings_show_join_leave_messages" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:defaultValue="true"
android:key="SETTINGS_SHOW_AVATAR_DISPLAY_NAME_CHANGES_MESSAGES_KEY"
android:summary="@string/settings_show_avatar_display_name_changes_messages_summary"
android:title="@string/settings_show_avatar_display_name_changes_messages" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="SETTINGS_VIBRATE_ON_MENTION_KEY"
android:title="@string/settings_vibrate_on_mention" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="SETTINGS_SEND_MESSAGE_WITH_ENTER"
android:summary="@string/settings_send_message_with_enter_summary"
android:title="@string/settings_send_message_with_enter" />

<im.vector.riotredesign.core.preference.VectorListPreference
android:defaultValue="always"
android:entries="@array/show_info_area_entries"
android:entryValues="@array/show_info_area_values"
android:key="SETTINGS_SHOW_INFO_AREA_KEY"
android:summary="%s"
android:title="@string/settings_info_area_show" />

</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

<im.vector.riotredesign.core.preference.VectorPreferenceDivider />

<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_HOME_DISPLAY_KEY"
android:title="@string/settings_home_display">

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:defaultValue="true"
android:key="SETTINGS_PIN_MISSED_NOTIFICATIONS_PREFERENCE_KEY"
android:title="@string/settings_pin_missed_notifications" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:defaultValue="true"
android:key="SETTINGS_PIN_UNREAD_MESSAGES_PREFERENCE_KEY"
android:title="@string/settings_pin_unread_messages" />

</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

<im.vector.riotredesign.core.preference.VectorPreferenceDivider />

<im.vector.riotredesign.core.preference.VectorPreferenceCategory android:title="@string/settings_media">

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_MEDIA_SAVING_PERIOD_KEY"
android:title="@string/settings_keep_media" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="SETTINGS_USE_NATIVE_CAMERA_PREFERENCE_KEY"
android:summary="@string/settings_labs_native_camera_summary"
android:title="@string/settings_labs_native_camera" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:defaultValue="true"
android:key="SETTINGS_PLAY_SHUTTER_SOUND_KEY"

android:title="@string/settings_play_shutter_sound" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="SETTINGS_PREVIEW_MEDIA_BEFORE_SENDING_KEY"
android:title="@string/settings_preview_media_before_sending" />

<im.vector.riotredesign.core.preference.VectorListPreference
android:defaultValue="0"
android:entries="@array/compression_levels"
android:entryValues="@array/compression_level_values"
android:key="SETTINGS_DEFAULT_MEDIA_COMPRESSION_KEY"
android:summary="%s"
android:title="@string/settings_default_compression" />

<im.vector.riotredesign.core.preference.VectorListPreference
android:defaultValue="0"
android:entries="@array/media_sources"
android:entryValues="@array/media_source_values"
android:key="SETTINGS_DEFAULT_MEDIA_SOURCE_KEY"
android:summary="%s"
android:title="@string/settings_default_media_source" />

</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

</androidx.preference.PreferenceScreen>

View File

@ -33,6 +33,13 @@
android:title="@string/preference_voice_and_video"
app:fragment="com.example.SyncFragment" />

<!-- TODO Ignored users -->
<im.vector.riotredesign.core.preference.VectorPreference
android:layout_width="match_parent"
android:icon="@drawable/ic_settings_root_security_privacy"
android:title="@string/settings_ignored_users"
app:fragment="com.example.SyncFragment" />

<im.vector.riotredesign.core.preference.VectorPreference
android:layout_width="match_parent"
android:icon="@drawable/ic_settings_root_security_privacy"

View File

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">

<!-- ************ Cryptography section ************ -->
<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_CRYPTOGRAPHY_PREFERENCE_KEY"
android:title="@string/settings_cryptography">

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_ENCRYPTION_INFORMATION_DEVICE_NAME_PREFERENCE_KEY"
android:title="@string/encryption_information_device_name" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_ENCRYPTION_INFORMATION_DEVICE_ID_PREFERENCE_KEY"
android:title="@string/encryption_information_device_id" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_ENCRYPTION_INFORMATION_DEVICE_KEY_PREFERENCE_KEY"
android:title="@string/encryption_information_device_key" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="SETTINGS_ENCRYPTION_NEVER_SENT_TO_PREFERENCE_KEY"
android:summary="@string/encryption_never_send_to_unverified_devices_summary"
android:title="@string/encryption_never_send_to_unverified_devices_title" />

</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

<im.vector.riotredesign.core.preference.VectorPreferenceDivider android:key="SETTINGS_CRYPTOGRAPHY_DIVIDER_PREFERENCE_KEY" />

<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_CRYPTOGRAPHY_MANAGE_PREFERENCE_KEY"
android:title="@string/settings_cryptography_manage_keys">

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_SECURE_MESSAGE_RECOVERY_PREFERENCE_KEY"
android:persistent="false"
android:summary="@string/encryption_settings_manage_message_recovery_summary"
android:title="@string/encryption_message_recovery" />
<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_ENCRYPTION_EXPORT_E2E_ROOM_KEYS_PREFERENCE_KEY"
android:summary="@string/encryption_export_room_keys_summary"
android:title="@string/encryption_export_e2e_room_keys" />

<im.vector.riotredesign.core.preference.VectorPreference
android:key="SETTINGS_ENCRYPTION_IMPORT_E2E_ROOM_KEYS_PREFERENCE_KEY"
android:summary="@string/encryption_import_room_keys_summary"
android:title="@string/encryption_import_e2e_room_keys" />

</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

<im.vector.riotredesign.core.preference.VectorPreferenceDivider android:key="SETTINGS_CRYPTOGRAPHY_MANAGE_DIVIDER_PREFERENCE_KEY" />

<!-- devices list: device ids + device names -->
<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_DEVICES_LIST_PREFERENCE_KEY"
android:title="@string/settings_devices_list" />

<im.vector.riotredesign.core.preference.VectorPreferenceDivider android:key="SETTINGS_DEVICES_DIVIDER_PREFERENCE_KEY" />

<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_ANALYTICS_PREFERENCE_KEY"
android:title="@string/settings_analytics">

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:defaultValue="false"
android:key="SETTINGS_USE_ANALYTICS_KEY"
android:summary="@string/settings_opt_in_of_analytics_summary"
android:title="@string/settings_opt_in_of_analytics" />

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="SETTINGS_USE_RAGE_SHAKE_KEY"
android:title="@string/send_bug_report_rage_shake" />
</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

<im.vector.riotredesign.core.preference.VectorPreferenceDivider />

</androidx.preference.PreferenceScreen>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">

<im.vector.riotredesign.core.preference.VectorPreferenceCategory android:title="@string/settings_call_category">

<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:defaultValue="true"
android:disableDependentsState="true"
android:key="SETTINGS_CALL_RINGTONE_USE_RIOT_PREFERENCE_KEY"
android:title="@string/settings_call_ringtone_use_riot_ringtone" />

<im.vector.riotredesign.core.preference.VectorPreference
android:dependency="SETTINGS_CALL_RINGTONE_USE_RIOT_PREFERENCE_KEY"
android:key="SETTINGS_CALL_RINGTONE_URI_PREFERENCE_KEY"
android:title="@string/settings_call_ringtone_title" />

</im.vector.riotredesign.core.preference.VectorPreferenceCategory>

</androidx.preference.PreferenceScreen>