mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-26 17:57:34 +00:00
Fix up preference screen a little
1) Remove phantom padding on left margin for all fragments 2) Move preferences around slightly 3) Add some card separators and style led list pref // FREEBIE
This commit is contained in:
19
res/drawable/preference_divider.xml
Normal file
19
res/drawable/preference_divider.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item>
|
||||
<shape>
|
||||
<padding android:top="1dp" android:right="0dp" android:bottom="0dp" android:left="0dp" />
|
||||
<solid android:color="#d4d4d4" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<shape>
|
||||
<padding android:top="1dp" android:right="0dp" android:bottom="0dp" android:left="0dp" />
|
||||
<solid android:color="#dddddd" />
|
||||
<size android:height="20dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</layer-list>
|
13
res/layout/led_color_preference_widget.xml
Normal file
13
res/layout/led_color_preference_widget.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="3dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/color_view"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:scaleType="fitXY" />
|
||||
</FrameLayout>
|
14
res/layout/preference_divider.xml
Normal file
14
res/layout/preference_divider.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_margin="0dp"
|
||||
android:background="@color/amber_50"
|
||||
android:padding="0dp">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="10dp"
|
||||
android:background="@drawable/preference_divider"/>
|
||||
|
||||
</LinearLayout>
|
@@ -1187,6 +1187,11 @@
|
||||
<string name="preferences_advanced__enable_support_for_next_generation_video_and_voice_calls">Support for next-generation video and voice calls when enabled by both parties. This feature is in beta.</string>
|
||||
<string name="preferences_advanced__relay_all_calls_through_the_signal_server_to_avoid_revealing_your_ip_address">Relay all calls through the Signal server to avoid revealing your IP address to your contact. Enabling will reduce call quality.</string>
|
||||
<string name="preferences_advanced__always_relay_calls">Always relay calls</string>
|
||||
<string name="preferences_app_protection__app_access">App access</string>
|
||||
<string name="preferences_app_protection__communication">Communication</string>
|
||||
<string name="preferences_chats__chats">Chats</string>
|
||||
<string name="preferences_notifications__message_notifications">Message notifications</string>
|
||||
<string name="preferences_notifications__events">Events</string>
|
||||
|
||||
|
||||
|
||||
|
@@ -7,24 +7,6 @@
|
||||
android:title="@string/preferences__signal_messages_and_calls"
|
||||
android:summary="@string/preferences__free_private_messages_and_calls"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||
android:defaultValue="false"
|
||||
android:key="pref_enter_sends"
|
||||
android:summary="@string/preferences__pressing_the_enter_key_will_send_text_messages"
|
||||
android:title="@string/preferences__pref_enter_sends_title"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||
android:defaultValue="false"
|
||||
android:key="pref_system_emoji"
|
||||
android:title="@string/preferences_advanced__use_system_emoji"
|
||||
android:summary="@string/preferences_advanced__disable_signal_built_in_emoji_support" />
|
||||
|
||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||
android:defaultValue="false"
|
||||
android:key="pref_turn_only"
|
||||
android:title="@string/preferences_advanced__always_relay_calls"
|
||||
android:summary="@string/preferences_advanced__relay_all_calls_through_the_signal_server_to_avoid_revealing_your_ip_address"/>
|
||||
|
||||
<Preference android:key="pref_choose_identity"
|
||||
android:title="@string/preferences__choose_identity"
|
||||
android:summary="@string/preferences__choose_your_contact_entry_from_the_contacts_list"/>
|
||||
|
@@ -1,39 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||
android:key="pref_enable_passphrase_temporary"
|
||||
android:defaultValue="true"
|
||||
android:title="@string/preferences__enable_passphrase"
|
||||
android:summary="@string/preferences__lock_signal_and_message_notifications_with_a_passphrase"/>
|
||||
<PreferenceCategory android:title="@string/preferences_app_protection__app_access">
|
||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||
android:key="pref_enable_passphrase_temporary"
|
||||
android:defaultValue="true"
|
||||
android:title="@string/preferences__enable_passphrase"
|
||||
android:summary="@string/preferences__lock_signal_and_message_notifications_with_a_passphrase"/>
|
||||
|
||||
<Preference android:key="pref_change_passphrase"
|
||||
android:title="@string/preferences__change_passphrase"
|
||||
android:summary="@string/preferences__change_your_passphrase"
|
||||
android:dependency="pref_enable_passphrase_temporary"/>
|
||||
<Preference android:key="pref_change_passphrase"
|
||||
android:title="@string/preferences__change_passphrase"
|
||||
android:summary="@string/preferences__change_your_passphrase"
|
||||
android:dependency="pref_enable_passphrase_temporary"/>
|
||||
|
||||
<CheckBoxPreference android:defaultValue="false"
|
||||
android:key="pref_timeout_passphrase"
|
||||
android:title="@string/preferences__inactivity_timeout_passphrase"
|
||||
android:summary="@string/preferences__auto_lock_signal_after_a_specified_time_interval_of_inactivity"
|
||||
android:dependency="pref_enable_passphrase_temporary"/>
|
||||
<CheckBoxPreference android:defaultValue="false"
|
||||
android:key="pref_timeout_passphrase"
|
||||
android:title="@string/preferences__inactivity_timeout_passphrase"
|
||||
android:summary="@string/preferences__auto_lock_signal_after_a_specified_time_interval_of_inactivity"
|
||||
android:dependency="pref_enable_passphrase_temporary"/>
|
||||
|
||||
<Preference android:title="@string/preferences__inactivity_timeout_interval"
|
||||
android:key="pref_timeout_interval"
|
||||
android:dependency="pref_timeout_passphrase"/>
|
||||
<Preference android:title="@string/preferences__inactivity_timeout_interval"
|
||||
android:key="pref_timeout_interval"
|
||||
android:dependency="pref_timeout_passphrase"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||
android:defaultValue="true"
|
||||
android:key="pref_screen_security"
|
||||
android:title="@string/preferences__screen_security"
|
||||
android:summary="@string/preferences__disable_screen_security_to_allow_screen_shots" />
|
||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||
android:defaultValue="true"
|
||||
android:key="pref_screen_security"
|
||||
android:title="@string/preferences__screen_security"
|
||||
android:summary="@string/preferences__disable_screen_security_to_allow_screen_shots" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:layout="@layout/preference_divider"/>
|
||||
|
||||
<PreferenceCategory android:title="@string/preferences_app_protection__communication">
|
||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||
android:defaultValue="true"
|
||||
android:key="pref_blocking_identity_changes"
|
||||
android:title="@string/preferences_app_protection__safety_numbers_approval"
|
||||
android:summary="@string/preferences_app_protecting__require_approval_of_new_safety_numbers_when_they_change"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||
android:defaultValue="false"
|
||||
android:key="pref_turn_only"
|
||||
android:title="@string/preferences_advanced__always_relay_calls"
|
||||
android:summary="@string/preferences_advanced__relay_all_calls_through_the_signal_server_to_avoid_revealing_your_ip_address"/>
|
||||
|
||||
<Preference android:key="preference_category_blocked"
|
||||
android:title="@string/preferences_app_protection__blocked_contacts" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||
android:defaultValue="true"
|
||||
android:key="pref_blocking_identity_changes"
|
||||
android:title="@string/preferences_app_protection__safety_numbers_approval"
|
||||
android:summary="@string/preferences_app_protecting__require_approval_of_new_safety_numbers_when_they_change"/>
|
||||
|
||||
<Preference android:key="preference_category_blocked"
|
||||
android:title="@string/preferences_app_protection__blocked_contacts" />
|
||||
</PreferenceScreen>
|
||||
|
@@ -27,6 +27,24 @@
|
||||
android:entryValues="@array/pref_media_download_entries" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:layout="@layout/preference_divider"/>
|
||||
|
||||
<PreferenceCategory android:title="@string/preferences_chats__chats">
|
||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||
android:defaultValue="false"
|
||||
android:key="pref_system_emoji"
|
||||
android:title="@string/preferences_advanced__use_system_emoji"
|
||||
android:summary="@string/preferences_advanced__disable_signal_built_in_emoji_support" />
|
||||
|
||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||
android:defaultValue="false"
|
||||
android:key="pref_enter_sends"
|
||||
android:summary="@string/preferences__pressing_the_enter_key_will_send_text_messages"
|
||||
android:title="@string/preferences__pref_enter_sends_title"/>
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:layout="@layout/preference_divider"/>
|
||||
|
||||
<PreferenceCategory android:key="message_trimming" android:title="@string/preferences_chats__message_trimming">
|
||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||
android:defaultValue="false"
|
||||
|
@@ -1,65 +1,75 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||
android:key="pref_key_enable_notifications"
|
||||
android:title="@string/preferences__notifications"
|
||||
android:summary="@string/preferences__enable_message_notifications"
|
||||
android:defaultValue="true" />
|
||||
|
||||
<RingtonePreference android:dependency="pref_key_enable_notifications"
|
||||
android:key="pref_key_ringtone"
|
||||
android:title="@string/preferences__sound"
|
||||
android:ringtoneType="notification"
|
||||
android:defaultValue="content://settings/system/notification_sound" />
|
||||
<PreferenceCategory android:title="@string/preferences_notifications__message_notifications">
|
||||
|
||||
<CheckBoxPreference android:dependency="pref_key_enable_notifications"
|
||||
android:key="pref_key_vibrate"
|
||||
android:defaultValue="true"
|
||||
android:title="@string/preferences__vibrate"
|
||||
android:summary="@string/preferences__also_vibrate_when_notified" />
|
||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||
android:key="pref_key_enable_notifications"
|
||||
android:title="@string/preferences__notifications"
|
||||
android:summary="@string/preferences__enable_message_notifications"
|
||||
android:defaultValue="true" />
|
||||
|
||||
<org.thoughtcrime.securesms.preferences.BooleanListPreference
|
||||
android:key="pref_led_color"
|
||||
android:defaultValue="blue"
|
||||
android:title="@string/preferences__led_color"
|
||||
android:dependency="pref_key_enable_notifications"
|
||||
android:entries="@array/pref_led_color_entries"
|
||||
android:entryValues="@array/pref_led_color_values" />
|
||||
<RingtonePreference android:dependency="pref_key_enable_notifications"
|
||||
android:key="pref_key_ringtone"
|
||||
android:title="@string/preferences__sound"
|
||||
android:ringtoneType="notification"
|
||||
android:defaultValue="content://settings/system/notification_sound" />
|
||||
|
||||
<org.thoughtcrime.securesms.preferences.LedBlinkPatternListPreference
|
||||
android:key="pref_led_blink"
|
||||
android:defaultValue="500,2000"
|
||||
android:title="@string/preferences__pref_led_blink_title"
|
||||
android:dependency="pref_led_color"
|
||||
android:entries="@array/pref_led_blink_pattern_entries"
|
||||
android:entryValues="@array/pref_led_blink_pattern_values" />
|
||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||
android:dependency="pref_key_enable_notifications"
|
||||
android:key="pref_key_vibrate"
|
||||
android:defaultValue="true"
|
||||
android:title="@string/preferences__vibrate"
|
||||
android:summary="@string/preferences__also_vibrate_when_notified" />
|
||||
|
||||
<CheckBoxPreference android:key="pref_key_inthread_notifications"
|
||||
android:title="@string/preferences__in_conversation_notifications"
|
||||
android:summary="@string/preferences__play_inthread_notifications"
|
||||
android:dependency="pref_key_enable_notifications"
|
||||
android:defaultValue="true" />
|
||||
|
||||
<ListPreference
|
||||
android:key="pref_repeat_alerts"
|
||||
android:defaultValue="0"
|
||||
android:title="@string/preferences__repeat_alerts"
|
||||
<org.thoughtcrime.securesms.preferences.LEDColorListPreference
|
||||
android:key="pref_led_color"
|
||||
android:defaultValue="blue"
|
||||
android:title="@string/preferences__led_color"
|
||||
android:dependency="pref_key_enable_notifications"
|
||||
android:entries="@array/pref_repeat_alerts_entries"
|
||||
android:entryValues="@array/pref_repeat_alerts_values" />
|
||||
android:entries="@array/pref_led_color_entries"
|
||||
android:entryValues="@array/pref_led_color_values" />
|
||||
|
||||
<ListPreference android:key="pref_notification_privacy"
|
||||
android:title="@string/preferences_notifications__display_in_notifications"
|
||||
android:dependency="pref_key_enable_notifications"
|
||||
android:defaultValue="all"
|
||||
android:entries="@array/pref_notification_privacy_entries"
|
||||
android:entryValues="@array/pref_notification_privacy_values"/>
|
||||
<org.thoughtcrime.securesms.preferences.LedBlinkPatternListPreference
|
||||
android:key="pref_led_blink"
|
||||
android:defaultValue="500,2000"
|
||||
android:title="@string/preferences__pref_led_blink_title"
|
||||
android:dependency="pref_led_color"
|
||||
android:entries="@array/pref_led_blink_pattern_entries"
|
||||
android:entryValues="@array/pref_led_blink_pattern_values" />
|
||||
|
||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||
android:key="pref_enable_new_contacts_notifications"
|
||||
android:title="@string/preferences__new_contacts_notifications"
|
||||
android:summary="@string/preferences__show_a_notification_for_new_signal_contacts"
|
||||
android:defaultValue="true" />
|
||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||
android:key="pref_key_inthread_notifications"
|
||||
android:title="@string/preferences__in_conversation_notifications"
|
||||
android:summary="@string/preferences__play_inthread_notifications"
|
||||
android:dependency="pref_key_enable_notifications"
|
||||
android:defaultValue="true" />
|
||||
|
||||
<ListPreference
|
||||
android:key="pref_repeat_alerts"
|
||||
android:defaultValue="0"
|
||||
android:title="@string/preferences__repeat_alerts"
|
||||
android:dependency="pref_key_enable_notifications"
|
||||
android:entries="@array/pref_repeat_alerts_entries"
|
||||
android:entryValues="@array/pref_repeat_alerts_values" />
|
||||
|
||||
<ListPreference android:key="pref_notification_privacy"
|
||||
android:title="@string/preferences_notifications__display_in_notifications"
|
||||
android:dependency="pref_key_enable_notifications"
|
||||
android:defaultValue="all"
|
||||
android:entries="@array/pref_notification_privacy_entries"
|
||||
android:entryValues="@array/pref_notification_privacy_values"/>
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:layout="@layout/preference_divider"/>
|
||||
|
||||
<PreferenceCategory android:title="@string/preferences_notifications__events">
|
||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||
android:key="pref_enable_new_contacts_notifications"
|
||||
android:title="Contact joined Signal"
|
||||
android:summary="@string/preferences__show_a_notification_for_new_signal_contacts"
|
||||
android:defaultValue="true" />
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
Reference in New Issue
Block a user