Migrate settings to PreferenceFragmentCompat

Includes code from https://github.com/consp1racy/android-support-preference
License: Apache License v2.0
This commit is contained in:
str4d
2016-01-20 23:33:53 +00:00
parent e458853f34
commit 770d9ddc5f
12 changed files with 485 additions and 281 deletions

View File

@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:title="@string/network_settings_title">
<ListPreference
android:defaultValue="false"
android:entries="@array/bt_setting_names"
android:entryValues="@array/boolean_array"
android:key="pref_key_bluetooth"
android:persistent="false"
android:summary="%s"
android:title="@string/bluetooth_setting"/>
<ListPreference
android:defaultValue="true"
android:entries="@array/tor_mobile_setting_names"
android:entryValues="@array/boolean_array"
android:key="pref_key_tor_mobile"
android:persistent="false"
android:summary="%s"
android:title="@string/tor_mobile_setting"/>
</PreferenceCategory>
<PreferenceCategory
android:title="@string/panic_setting_title">
<Preference
android:summary="@string/panic_setting_hint"
android:title="@string/panic_setting">
<intent
android:targetClass="org.briarproject.android.panic.PanicPreferencesActivity"
android:targetPackage="org.briarproject"/>
</Preference>
</PreferenceCategory>
<PreferenceCategory
android:title="@string/notification_settings_title">
<CheckBoxPreference
android:defaultValue="true"
android:key="pref_key_notify_private_messages"
android:persistent="false"
android:title="@string/notify_private_messages_setting"/>
<CheckBoxPreference
android:defaultValue="true"
android:key="pref_key_notify_forum_posts"
android:persistent="false"
android:title="@string/notify_forum_posts_setting"/>
<CheckBoxPreference
android:defaultValue="true"
android:key="pref_key_notify_vibration"
android:persistent="false"
android:title="@string/notify_vibration_setting"/>
<Preference
android:key="pref_key_notify_sound"
android:title="@string/notify_sound_setting"/>
</PreferenceCategory>
</PreferenceScreen>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:title="Debug">
<Preference
android:title="Debug information">
<intent
android:targetClass="org.briarproject.android.TestingActivity"
android:targetPackage="org.briarproject"/>
</Preference>
</PreferenceCategory>
</PreferenceScreen>