mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
Move Display category into its own settings screen
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?android:attr/textColorPrimary"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M21,3L3,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h18c1.1,0 2,-0.9 2,-2L23,5c0,-1.1 -0.9,-2 -2,-2zM21,19.01L3,19.01L3,4.99h18v14.02zM8,16h2.5l1.5,1.5 1.5,-1.5L16,16v-2.5l1.5,-1.5 -1.5,-1.5L16,8h-2.5L12,6.5 10.5,8L8,8v2.5L6.5,12 8,13.5L8,16zM12,9c1.66,0 3,1.34 3,3s-1.34,3 -3,3L12,9z" />
|
||||
</vector>
|
||||
@@ -68,8 +68,8 @@
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/fragment"
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/fragmentContainer"
|
||||
android:name="org.briarproject.briar.android.settings.SettingsFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
@@ -468,7 +468,7 @@
|
||||
<string name="pref_theme_light">Light</string>
|
||||
<string name="pref_theme_dark">Dark</string>
|
||||
<string name="pref_theme_auto">Automatic (Daytime)</string>
|
||||
<string name="pref_theme_system">System Default</string>
|
||||
<string name="pref_theme_system">System default</string>
|
||||
|
||||
<!-- Settings Connections -->
|
||||
<string name="network_settings_title">Connections</string>
|
||||
|
||||
@@ -1,29 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<PreferenceCategory
|
||||
android:layout="@layout/preferences_category"
|
||||
android:title="@string/display_settings_title">
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="default"
|
||||
android:entryValues="@array/pref_language_values"
|
||||
android:key="pref_key_language"
|
||||
android:summary="%s"
|
||||
android:title="@string/pref_language_title"
|
||||
app:iconSpaceReserved="false"/>
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="@string/pref_theme_light_value"
|
||||
android:entries="@array/pref_theme_entries"
|
||||
android:entryValues="@array/pref_theme_values"
|
||||
android:key="pref_key_theme"
|
||||
android:summary="%s"
|
||||
android:title="@string/pref_theme_title"
|
||||
app:iconSpaceReserved="false"/>
|
||||
|
||||
</PreferenceCategory>
|
||||
<Preference
|
||||
android:title="@string/display_settings_title"
|
||||
app:fragment="org.briarproject.briar.android.settings.DisplayFragment"
|
||||
app:icon="@drawable/ic_settings_brightness" />
|
||||
|
||||
<PreferenceCategory
|
||||
android:layout="@layout/preferences_category"
|
||||
@@ -35,7 +17,7 @@
|
||||
android:persistent="false"
|
||||
android:title="@string/bluetooth_setting"
|
||||
android:widgetLayout="@layout/preference_switch_compat"
|
||||
app:iconSpaceReserved="false"/>
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
@@ -43,16 +25,16 @@
|
||||
android:persistent="false"
|
||||
android:title="@string/wifi_setting"
|
||||
android:widgetLayout="@layout/preference_switch_compat"
|
||||
app:iconSpaceReserved="false"/>
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="pref_key_tor_enable"
|
||||
android:persistent="false"
|
||||
android:title="@string/tor_enable_title"
|
||||
android:summary="@string/tor_enable_summary"
|
||||
android:title="@string/tor_enable_title"
|
||||
android:widgetLayout="@layout/preference_switch_compat"
|
||||
app:iconSpaceReserved="false"/>
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="0"
|
||||
@@ -63,7 +45,7 @@
|
||||
android:persistent="false"
|
||||
android:summary="%s"
|
||||
android:title="@string/tor_network_setting"
|
||||
app:iconSpaceReserved="false"/>
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
@@ -72,17 +54,17 @@
|
||||
android:persistent="false"
|
||||
android:title="@string/tor_mobile_data_title"
|
||||
android:widgetLayout="@layout/preference_switch_compat"
|
||||
app:iconSpaceReserved="false"/>
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:dependency="pref_key_tor_enable"
|
||||
android:key="pref_key_tor_only_when_charging"
|
||||
android:persistent="false"
|
||||
android:title="@string/tor_only_when_charging_title"
|
||||
android:summary="@string/tor_only_when_charging_summary"
|
||||
android:title="@string/tor_only_when_charging_title"
|
||||
android:widgetLayout="@layout/preference_switch_compat"
|
||||
app:iconSpaceReserved="false"/>
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
@@ -97,7 +79,7 @@
|
||||
android:summary="@string/pref_lock_summary"
|
||||
android:title="@string/pref_lock_title"
|
||||
android:widgetLayout="@layout/preference_switch_compat"
|
||||
app:iconSpaceReserved="false"/>
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="@string/pref_lock_timeout_value_default"
|
||||
@@ -108,7 +90,7 @@
|
||||
android:persistent="false"
|
||||
android:summary="@string/pref_lock_timeout_summary"
|
||||
android:title="@string/pref_lock_timeout_title"
|
||||
app:iconSpaceReserved="false"/>
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<Preference
|
||||
android:key="pref_key_change_password"
|
||||
@@ -117,7 +99,7 @@
|
||||
|
||||
<intent
|
||||
android:targetClass="org.briarproject.briar.android.login.ChangePasswordActivity"
|
||||
android:targetPackage="@string/app_package"/>
|
||||
android:targetPackage="@string/app_package" />
|
||||
</Preference>
|
||||
|
||||
</PreferenceCategory>
|
||||
@@ -133,7 +115,7 @@
|
||||
|
||||
<intent
|
||||
android:targetClass="org.briarproject.briar.android.panic.PanicPreferencesActivity"
|
||||
android:targetPackage="@string/app_package"/>
|
||||
android:targetPackage="@string/app_package" />
|
||||
|
||||
</Preference>
|
||||
|
||||
@@ -149,7 +131,7 @@
|
||||
android:summary="@string/notify_sign_in_summary"
|
||||
android:title="@string/notify_sign_in_title"
|
||||
android:widgetLayout="@layout/preference_switch_compat"
|
||||
app:iconSpaceReserved="false"/>
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
@@ -158,7 +140,7 @@
|
||||
android:summary="@string/notify_private_messages_setting_summary"
|
||||
android:title="@string/notify_private_messages_setting_title"
|
||||
android:widgetLayout="@layout/preference_switch_compat"
|
||||
app:iconSpaceReserved="false"/>
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
@@ -167,7 +149,7 @@
|
||||
android:summary="@string/notify_group_messages_setting_summary"
|
||||
android:title="@string/notify_group_messages_setting_title"
|
||||
android:widgetLayout="@layout/preference_switch_compat"
|
||||
app:iconSpaceReserved="false"/>
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
@@ -176,7 +158,7 @@
|
||||
android:summary="@string/notify_forum_posts_setting_summary"
|
||||
android:title="@string/notify_forum_posts_setting_title"
|
||||
android:widgetLayout="@layout/preference_switch_compat"
|
||||
app:iconSpaceReserved="false"/>
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
@@ -185,7 +167,7 @@
|
||||
android:summary="@string/notify_blog_posts_setting_summary"
|
||||
android:title="@string/notify_blog_posts_setting_title"
|
||||
android:widgetLayout="@layout/preference_switch_compat"
|
||||
app:iconSpaceReserved="false"/>
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
@@ -193,12 +175,12 @@
|
||||
android:persistent="false"
|
||||
android:title="@string/notify_vibration_setting"
|
||||
android:widgetLayout="@layout/preference_switch_compat"
|
||||
app:iconSpaceReserved="false"/>
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<Preference
|
||||
android:key="pref_key_notify_sound"
|
||||
android:title="@string/notify_sound_setting"
|
||||
app:iconSpaceReserved="false"/>
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
@@ -209,7 +191,7 @@
|
||||
<Preference
|
||||
android:key="pref_key_send_feedback"
|
||||
android:title="@string/send_feedback"
|
||||
app:iconSpaceReserved="false"/>
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
@@ -224,13 +206,13 @@
|
||||
|
||||
<intent
|
||||
android:targetClass="org.briarproject.briar.android.test.TestDataActivity"
|
||||
android:targetPackage="@string/app_package"/>
|
||||
android:targetPackage="@string/app_package" />
|
||||
</Preference>
|
||||
|
||||
<Preference
|
||||
android:key="pref_key_explode"
|
||||
android:title="Crash"
|
||||
app:iconSpaceReserved="false"/>
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
|
||||
24
briar-android/src/main/res/xml/settings_display.xml
Normal file
24
briar-android/src/main/res/xml/settings_display.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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">
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="default"
|
||||
android:entryValues="@array/pref_language_values"
|
||||
android:key="pref_key_language"
|
||||
android:summary="%s"
|
||||
android:title="@string/pref_language_title"
|
||||
app:iconSpaceReserved="false"
|
||||
tools:summary="System default" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="@string/pref_theme_light_value"
|
||||
android:entries="@array/pref_theme_entries"
|
||||
android:entryValues="@array/pref_theme_values"
|
||||
android:key="pref_key_theme"
|
||||
android:summary="%s"
|
||||
android:title="@string/pref_theme_title"
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
</PreferenceScreen>
|
||||
Reference in New Issue
Block a user