Code quality: preference

This commit is contained in:
Benoit Marty
2019-06-25 15:03:32 +02:00
parent 71ae99012b
commit ce3242c748
12 changed files with 42 additions and 41 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
<im.vector.riotredesign.core.preference.VectorPreferenceCategory
android:key="SETTINGS_NOTIFICATION_LEVEL"
android:persistent="false"
android:title="@string/settings_notification_by_event">
@ -34,7 +34,7 @@
android:key="SETTINGS_MESSAGES_SENT_BY_BOT_PREFERENCE_KEY_2"
android:title="@string/settings_messages_sent_by_bot" />
</PreferenceCategory>
</im.vector.riotredesign.core.preference.VectorPreferenceCategory>
<im.vector.riotredesign.core.preference.VectorPreferenceDivider />

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<!--<SwitchPreference-->
<!--<im.vector.riotredesign.core.preference.VectorSwitchPreference-->
<!--android:key="SETTINGS_ENABLE_ALL_NOTIF_PREFERENCE_KEY"-->
<!--android:title="@string/settings_enable_all_notif" />-->
<SwitchPreference
<im.vector.riotredesign.core.preference.VectorSwitchPreference
android:key="SETTINGS_ENABLE_THIS_DEVICE_PREFERENCE_KEY"
android:defaultValue="true"
android:title="@string/settings_enable_this_device" />
@ -17,12 +17,12 @@
<!--android:key="SETTINGS_TURN_SCREEN_ON_PREFERENCE_KEY"-->
<!--android:title="@string/settings_turn_screen_on" />-->
<!--<Preference-->
<!--<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" />-->
<Preference
<im.vector.riotredesign.core.preference.VectorPreference
android:dependency="SETTINGS_ENABLE_THIS_DEVICE_PREFERENCE_KEY"
android:key="SETTINGS_NOTIFICATION_ADVANCED_PREFERENCE_KEY"
android:persistent="false"
@ -32,24 +32,24 @@
android:enabled="false"
app:fragment="im.vector.fragments.VectorSettingsNotificationsAdvancedFragment" />
<Preference
<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" />
<PreferenceCategory android:title="@string/settings_expert">
<Preference
<im.vector.riotredesign.core.preference.VectorPreference
android:layout_width="match_parent"
android:title="@string/settings_notifications_targets"
android:persistent="false"
app:fragment="im.vector.riotredesign.features.settings.push.PushGatewaysFragment" />
<Preference
<im.vector.riotredesign.core.preference.VectorPreference
android:layout_width="match_parent"
android:title="@string/settings_push_rules"
android:persistent="false"
app:fragment="im.vector.riotredesign.features.settings.push.PushRulesFragment" />
</PreferenceCategory>
</PreferenceScreen>
</androidx.preference.PreferenceScreen>

View File

@ -1,21 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<Preference
<im.vector.riotredesign.core.preference.VectorPreference
android:layout_width="match_parent"
android:icon="@drawable/ic_settings_general"
android:title="@string/settings_general_title"
app:fragment="com.example.SyncFragment" />
<Preference
<im.vector.riotredesign.core.preference.VectorPreference
android:layout_width="match_parent"
android:icon="@drawable/ic_flair"
android:title="@string/settings_flair"
app:fragment="com.example.SyncFragment" />
<Preference
<im.vector.riotredesign.core.preference.VectorPreference
android:layout_width="match_parent"
android:icon="@drawable/ic_bell"
android:key="SETTINGS_NOTIFICATIONS_KEY"
@ -23,32 +23,32 @@
app:fragment="im.vector.riotredesign.features.settings.VectorSettingsNotificationPreferenceFragment" />
<Preference
<im.vector.riotredesign.core.preference.VectorPreference
android:layout_width="match_parent"
android:icon="@drawable/ic_sliders"
android:title="@string/settings_preferences"
app:fragment="com.example.SyncFragment" />
<Preference
<im.vector.riotredesign.core.preference.VectorPreference
android:layout_width="match_parent"
android:icon="@drawable/ic_lock"
android:title="@string/settings_security_and_privacy"
app:fragment="com.example.SyncFragment" />
<Preference
<im.vector.riotredesign.core.preference.VectorPreference
android:layout_width="match_parent"
android:icon="@drawable/ic_settings_lab"
android:title="@string/room_settings_labs_pref_title"
app:fragment="com.example.SyncFragment" />
<Preference
<im.vector.riotredesign.core.preference.VectorPreference
android:layout_width="match_parent"
android:icon="@drawable/ic_devices_info"
android:title="Legacy"
app:fragment="com.example.SyncFragment" />
</PreferenceScreen>
</androidx.preference.PreferenceScreen>