Skip to content
Snippets Groups Projects
Commit a5271eee authored by akwizgran's avatar akwizgran
Browse files

Merge branch 'switch-preference-android-4' into 'master'

Use Material style for SwitchPreference on Android 4

See merge request !897
parents 4dfc9699 f08f441f
No related branches found
No related tags found
No related merge requests found
<?xml version="1.0" encoding="utf-8"?>
<!-- Needed for SwitchPreference on Android 4 (API < 21)-->
<android.support.v7.widget.SwitchCompat
android:id="@android:id/switch_widget"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:clickable="false"
android:focusable="false"
android:focusableInTouchMode="false"
tools:targetApi="n"/>
...@@ -48,7 +48,8 @@ ...@@ -48,7 +48,8 @@
android:defaultValue="true" android:defaultValue="true"
android:key="pref_key_tor_mobile_data" android:key="pref_key_tor_mobile_data"
android:persistent="false" android:persistent="false"
android:title="@string/tor_mobile_data_title"/> android:title="@string/tor_mobile_data_title"
android:widgetLayout="@layout/preference_switch_compat"/>
</PreferenceCategory> </PreferenceCategory>
...@@ -57,10 +58,12 @@ ...@@ -57,10 +58,12 @@
android:title="@string/security_settings_title"> android:title="@string/security_settings_title">
<SwitchPreference <SwitchPreference
android:enabled="false"
android:key="pref_key_lock" android:key="pref_key_lock"
android:persistent="false" android:persistent="false"
android:summary="@string/pref_lock_summary" android:summary="@string/pref_lock_summary"
android:title="@string/pref_lock_title"/> android:title="@string/pref_lock_title"
android:widgetLayout="@layout/preference_switch_compat"/>
<ListPreference <ListPreference
android:defaultValue="@string/pref_lock_timeout_value_default" android:defaultValue="@string/pref_lock_timeout_value_default"
...@@ -107,35 +110,40 @@ ...@@ -107,35 +110,40 @@
android:defaultValue="true" android:defaultValue="true"
android:key="pref_key_notify_sign_in" android:key="pref_key_notify_sign_in"
android:summary="@string/notify_sign_in_summary" android:summary="@string/notify_sign_in_summary"
android:title="@string/notify_sign_in_title"/> android:title="@string/notify_sign_in_title"
android:widgetLayout="@layout/preference_switch_compat"/>
<SwitchPreference <SwitchPreference
android:defaultValue="true" android:defaultValue="true"
android:key="pref_key_notify_private_messages" android:key="pref_key_notify_private_messages"
android:persistent="false" android:persistent="false"
android:summary="@string/notify_private_messages_setting_summary" android:summary="@string/notify_private_messages_setting_summary"
android:title="@string/notify_private_messages_setting_title"/> android:title="@string/notify_private_messages_setting_title"
android:widgetLayout="@layout/preference_switch_compat"/>
<SwitchPreference <SwitchPreference
android:defaultValue="true" android:defaultValue="true"
android:key="pref_key_notify_group_messages" android:key="pref_key_notify_group_messages"
android:persistent="false" android:persistent="false"
android:summary="@string/notify_group_messages_setting_summary" android:summary="@string/notify_group_messages_setting_summary"
android:title="@string/notify_group_messages_setting_title"/> android:title="@string/notify_group_messages_setting_title"
android:widgetLayout="@layout/preference_switch_compat"/>
<SwitchPreference <SwitchPreference
android:defaultValue="true" android:defaultValue="true"
android:key="pref_key_notify_forum_posts" android:key="pref_key_notify_forum_posts"
android:persistent="false" android:persistent="false"
android:summary="@string/notify_forum_posts_setting_summary" android:summary="@string/notify_forum_posts_setting_summary"
android:title="@string/notify_forum_posts_setting_title"/> android:title="@string/notify_forum_posts_setting_title"
android:widgetLayout="@layout/preference_switch_compat"/>
<SwitchPreference <SwitchPreference
android:defaultValue="true" android:defaultValue="true"
android:key="pref_key_notify_blog_posts" android:key="pref_key_notify_blog_posts"
android:persistent="false" android:persistent="false"
android:summary="@string/notify_blog_posts_setting_summary" android:summary="@string/notify_blog_posts_setting_summary"
android:title="@string/notify_blog_posts_setting_title"/> android:title="@string/notify_blog_posts_setting_title"
android:widgetLayout="@layout/preference_switch_compat"/>
<SwitchPreference <SwitchPreference
android:defaultValue="false" android:defaultValue="false"
...@@ -143,13 +151,15 @@ ...@@ -143,13 +151,15 @@
android:persistent="false" android:persistent="false"
android:summary="@string/notify_lock_screen_setting_summary" android:summary="@string/notify_lock_screen_setting_summary"
android:title="@string/notify_lock_screen_setting_title" android:title="@string/notify_lock_screen_setting_title"
android:visibility="gone"/> android:visibility="gone"
android:widgetLayout="@layout/preference_switch_compat"/>
<SwitchPreference <SwitchPreference
android:defaultValue="true" android:defaultValue="true"
android:key="pref_key_notify_vibration" android:key="pref_key_notify_vibration"
android:persistent="false" android:persistent="false"
android:title="@string/notify_vibration_setting"/> android:title="@string/notify_vibration_setting"
android:widgetLayout="@layout/preference_switch_compat"/>
<Preference <Preference
android:key="pref_key_notify_sound" android:key="pref_key_notify_sound"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment