mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-26 04:38:03 +00:00
more precise sms controls
// FREEBIE
This commit is contained in:
18
res/drawable/conversation_item_sent_indicator_text_shape.xml
Normal file
18
res/drawable/conversation_item_sent_indicator_text_shape.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#09000000" />
|
||||
<corners android:radius="@dimen/conversation_item_corner_radius" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<item android:bottom="@dimen/conversation_item_drop_shadow_dist">
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/conversation_item_received_background_light" />
|
||||
<corners android:bottomLeftRadius="@dimen/conversation_item_corner_radius" android:bottomRightRadius="@dimen/conversation_item_corner_radius" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</layer-list>
|
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#09000000" />
|
||||
<corners android:radius="@dimen/conversation_item_corner_radius" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<item android:bottom="@dimen/conversation_item_drop_shadow_dist">
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/conversation_item_received_background_dark" />
|
||||
<corners android:bottomLeftRadius="@dimen/conversation_item_corner_radius" android:bottomRightRadius="@dimen/conversation_item_corner_radius" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</layer-list>
|
@@ -18,9 +18,10 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="right"
|
||||
android:gravity="left|center_vertical"
|
||||
android:layout_marginLeft="6dp"
|
||||
android:layout_alignParentLeft="true">
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_centerVertical="true">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/sms_failed_indicator"
|
||||
@@ -29,6 +30,15 @@
|
||||
android:src="@drawable/ic_list_alert_sms_failed"
|
||||
android:visibility="gone"
|
||||
android:contentDescription="Send Failed Indicator"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/pending_approval_indicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_dialog_info_holo_light"
|
||||
android:visibility="gone"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:contentDescription="Pending Approval"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout android:id="@+id/conversation_item_parent"
|
||||
@@ -190,5 +200,22 @@
|
||||
android:scaleType="centerCrop"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView android:id="@+id/indicator_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/conversation_item_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:paddingRight="5dip"
|
||||
android:paddingLeft="5dip"
|
||||
android:paddingTop="3dp"
|
||||
android:paddingBottom="3dp"
|
||||
android:layout_marginLeft="50dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginTop="-2dp"
|
||||
android:textSize="12sp"
|
||||
android:textColor="?conversation_sent_text_secondary_color"
|
||||
android:background="?conversation_item_sent_indicator_text_background"
|
||||
android:visibility="gone" />
|
||||
|
||||
</RelativeLayout>
|
||||
</org.thoughtcrime.securesms.ConversationItem>
|
||||
|
44
res/layout/outgoing_sms_preference.xml
Normal file
44
res/layout/outgoing_sms_preference.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="15dp"
|
||||
android:paddingLeft="15dp"
|
||||
android:paddingBottom="15dp"
|
||||
android:paddingRight="10dp">
|
||||
|
||||
<CheckBox android:id="@+id/data_users"
|
||||
style="@style/TextSecureDialogPrimaryText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:checkMark="?android:attr/listChoiceIndicatorMultiple"
|
||||
android:singleLine="true"
|
||||
android:text="@string/preferences__sms_outgoing_push_users" />
|
||||
|
||||
<TextView
|
||||
style="@style/TextSecureDialogSecondaryText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="-5dp"
|
||||
android:layout_marginLeft="32dp"
|
||||
android:textSize="12sp"
|
||||
android:text="@string/preferences__sms_outgoing_push_users_description" />
|
||||
|
||||
<CheckBox android:id="@+id/ask_before_fallback_data"
|
||||
style="@style/TextSecureDialogPrimaryText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:checkMark="?android:attr/listChoiceIndicatorMultiple"
|
||||
android:text="@string/preferences__sms_fallback_ask_fallback"
|
||||
android:layout_marginLeft="25dp" />
|
||||
|
||||
<CheckBox android:id="@+id/non_data_users"
|
||||
style="@style/TextSecureDialogPrimaryText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:checkMark="?android:attr/listChoiceIndicatorMultiple"
|
||||
android:text="@string/preferences__sms_fallback_non_push_users" />
|
||||
|
||||
</LinearLayout>
|
@@ -4,4 +4,12 @@
|
||||
<style name="Widget.ProgressBar.Horizontal" parent="@android:style/Widget.Holo.ProgressBar.Horizontal">
|
||||
</style>
|
||||
|
||||
<style name="TextSecureDialogPrimaryText">
|
||||
<item name="android:textColor">?conversation_list_item_contact_color</item>
|
||||
</style>
|
||||
|
||||
<style name="TextSecureDialogSecondaryText">
|
||||
<item name="android:textColor">?conversation_list_item_date_color</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
@@ -37,6 +37,7 @@
|
||||
<attr name="conversation_item_sent_pending_triangle_background" format="reference" />
|
||||
<attr name="conversation_item_sent_push_background" format="reference" />
|
||||
<attr name="conversation_item_sent_push_triangle_background" format="reference" />
|
||||
<attr name="conversation_item_sent_indicator_text_background" format="reference" />
|
||||
<attr name="dialog_info_icon" format="reference" />
|
||||
<attr name="dialog_alert_icon" format="reference" />
|
||||
<attr name="conversation_item_sent_push_pending_background" format="reference" />
|
||||
|
@@ -30,4 +30,4 @@
|
||||
<color name="conversation_item_received_background_dark">#ff333333</color>
|
||||
<color name="conversation_item_received_shadow_light">#ffd5d5d5</color>
|
||||
<color name="conversation_item_received_shadow_dark">#ff222222</color>
|
||||
</resources>
|
||||
</resources>
|
||||
|
@@ -32,9 +32,9 @@
|
||||
<string name="ApplicationPreferencesActivity_you_are_not_registered_with_the_push_service">You are not registered with the push service...</string>
|
||||
<string name="ApplicationPreferencesActivity_updating_directory">Updating directory</string>
|
||||
<string name="ApplicationPreferencesActivity_updating_push_directory">Updating push directory...</string>
|
||||
<string name="ApplicationPreferencesActivity_sms_enabled">SMS Enabled</string>
|
||||
<string name="ApplicationPreferencesActivity_sms_enabled">Incoming SMS Enabled</string>
|
||||
<string name="ApplicationPreferencesActivity_touch_to_change_your_default_sms_app">Touch to change your default SMS app</string>
|
||||
<string name="ApplicationPreferencesActivity_sms_disabled">SMS Disabled</string>
|
||||
<string name="ApplicationPreferencesActivity_sms_disabled">Incoming SMS Disabled</string>
|
||||
<string name="ApplicationPreferencesActivity_touch_to_make_textsecure_your_default_sms_app">Touch to make TextSecure your default SMS app</string>
|
||||
|
||||
<!-- AttachmentTypeSelectorAdapter -->
|
||||
@@ -63,6 +63,8 @@
|
||||
<string name="ConversationItem_group_action_left">%1$s has left the group.</string>
|
||||
<string name="ConversationItem_group_action_joined">%1$s have joined the group.</string>
|
||||
<string name="ConversationItem_group_action_modify">%1$s has updated the group.</string>
|
||||
<string name="ConversationItem_click_to_approve">Tap for SMS fallback</string>
|
||||
<string name="ConversationItem_click_to_approve_dialog_title">Fallback to SMS?</string>
|
||||
|
||||
<!-- ConversationActivity -->
|
||||
<string name="ConversationActivity_initiate_secure_session_question">Initiate Secure Session?</string>
|
||||
@@ -642,8 +644,9 @@
|
||||
|
||||
<!-- preferences.xml -->
|
||||
<string name="preferences__general">General</string>
|
||||
<string name="preferences__pref_all_sms_title">Use for all SMS</string>
|
||||
<string name="preferences__pref_all_mms_title">Use for all MMS</string>
|
||||
<string name="preferences__push_sms_category">Push and SMS</string>
|
||||
<string name="preferences__pref_all_sms_title">Receive all SMS</string>
|
||||
<string name="preferences__pref_all_mms_title">Receive all MMS</string>
|
||||
<string name="preferences__use_textsecure_for_viewing_and_storing_all_incoming_text_messages">Use TextSecure for viewing and storing all incoming text messages</string>
|
||||
<string name="preferences__use_textsecure_for_viewing_and_storing_all_incoming_multimedia_messages">Use TextSecure for viewing and storing all incoming multimedia messages</string>
|
||||
<string name="preferences__enable_enter_key_title">Enable Enter key</string>
|
||||
@@ -726,11 +729,16 @@
|
||||
<string name="preferences__use_the_data_channel_for_communication_with_other_textsecure_users">
|
||||
Increase privacy and avoid SMS fees by using the data channel for communication with other TextSecure users
|
||||
</string>
|
||||
<string name="preferences__allow_sms_fallback">SMS Fallback</string>
|
||||
<string name="preferences__allow_sms_fallback">Allow outgoing SMS to</string>
|
||||
<string name="preferences__allow_sms_fallback_disabled_reason">TextSecure is currently your default SMS app. Please set another default SMS app first to change this preference.</string>
|
||||
<string name="preferences__send_and_receive_sms_messages_when_push_is_not_available">Send and receive SMS messages when push is not available</string>
|
||||
<string name="preferences__refresh_push_directory">Refresh Push Directory</string>
|
||||
<string name="preferences__submit_debug_log">Submit debug log</string>
|
||||
<string name="preferences__sms_outgoing_push_users">TextSecure users</string>
|
||||
<string name="preferences__sms_fallback_push_users_ask">(ask first)</string>
|
||||
<string name="preferences__sms_outgoing_push_users_description">Send secure SMS if data connectivity is lost</string>
|
||||
<string name="preferences__sms_fallback_ask_fallback">Ask before sending SMS</string>
|
||||
<string name="preferences__sms_fallback_non_push_users">Non-TextSecure users</string>
|
||||
<string name="preferences__sms_fallback_nobody">Nobody</string>
|
||||
|
||||
<!-- **************************************** -->
|
||||
<!-- menus -->
|
||||
|
@@ -107,4 +107,13 @@
|
||||
|
||||
<style name="Widget.ProgressBar.Horizontal" parent="@android:style/Widget.ProgressBar.Horizontal">
|
||||
</style>
|
||||
|
||||
<style name="TextSecureDialogPrimaryText">
|
||||
<item name="android:textColor">@color/white</item>
|
||||
</style>
|
||||
|
||||
<style name="TextSecureDialogSecondaryText">
|
||||
<item name="android:textColor">#ff999999</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
@@ -39,6 +39,7 @@
|
||||
<item name="conversation_item_sent_triangle_background">@drawable/conversation_item_sent_triangle_shape</item>
|
||||
<item name="conversation_item_sent_push_background">@drawable/conversation_item_sent_push_shape</item>
|
||||
<item name="conversation_item_sent_push_triangle_background">@drawable/conversation_item_sent_push_triangle_shape</item>
|
||||
<item name="conversation_item_sent_indicator_text_background">@drawable/conversation_item_sent_indicator_text_shape</item>
|
||||
<item name="dialog_info_icon">@drawable/ic_dialog_info_light</item>
|
||||
<item name="dialog_alert_icon">@drawable/ic_dialog_alert_light</item>
|
||||
<item name="conversation_item_sent_pending_background">@drawable/conversation_item_sent_pending_shape</item>
|
||||
@@ -59,7 +60,6 @@
|
||||
<item name="menu_split_icon">@drawable/ic_menu_split_holo_light</item>
|
||||
<item name="menu_accept_icon">@drawable/ic_menu_accept_holo_light</item>
|
||||
<item name="menu_refresh_directory">@drawable/ic_menu_refresh_holo_light</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="TextSecure.LightTheme.NavigationDrawer"
|
||||
@@ -100,6 +100,7 @@
|
||||
<item name="conversation_item_sent_triangle_background">@drawable/conversation_item_sent_triangle_shape_dark</item>
|
||||
<item name="conversation_item_sent_push_background">@drawable/conversation_item_sent_push_shape_dark</item>
|
||||
<item name="conversation_item_sent_push_triangle_background">@drawable/conversation_item_sent_push_triangle_shape_dark</item>
|
||||
<item name="conversation_item_sent_indicator_text_background">@drawable/conversation_item_sent_indicator_text_shape_dark</item>
|
||||
<item name="dialog_info_icon">@drawable/ic_dialog_info_dark</item>
|
||||
<item name="dialog_alert_icon">@drawable/ic_dialog_alert_dark</item>
|
||||
<item name="conversation_item_sent_pending_background">@drawable/conversation_item_sent_pending_shape_dark</item>
|
||||
|
@@ -1,7 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceCategory android:key="general_category" android:title="@string/preferences__general">
|
||||
<PreferenceCategory android:key="push_sms_category" android:title="@string/preferences__push_sms_category">
|
||||
<CheckBoxPreference android:defaultValue="false"
|
||||
android:key="pref_toggle_push_messaging"
|
||||
android:title="@string/preferences__use_data_channel"
|
||||
android:summary="@string/preferences__use_the_data_channel_for_communication_with_other_textsecure_users"/>
|
||||
|
||||
<CheckBoxPreference android:defaultValue="true"
|
||||
android:key="pref_all_sms"
|
||||
android:summary="@string/preferences__use_textsecure_for_viewing_and_storing_all_incoming_text_messages"
|
||||
@@ -16,22 +21,14 @@
|
||||
android:title="@string/preferences__make_default_sms_app"
|
||||
android:summary="@string/preferences__make_textsecure_the_default_sms_mms_app" />
|
||||
|
||||
<CheckBoxPreference android:defaultValue="false"
|
||||
android:key="pref_toggle_push_messaging"
|
||||
android:title="@string/preferences__use_data_channel"
|
||||
android:summary="@string/preferences__use_the_data_channel_for_communication_with_other_textsecure_users"/>
|
||||
|
||||
<CheckBoxPreference android:defaultValue="true"
|
||||
android:enabled="false"
|
||||
android:key="pref_allow_sms_traffic_out"
|
||||
android:title="@string/preferences__allow_sms_fallback"
|
||||
android:summary="@string/preferences__send_and_receive_sms_messages_when_push_is_not_available"/>
|
||||
<org.thoughtcrime.securesms.components.OutgoingSmsPreference
|
||||
android:key="pref_outgoing_sms"
|
||||
android:title="@string/preferences__allow_sms_fallback" />
|
||||
|
||||
<CheckBoxPreference android:defaultValue="false"
|
||||
android:key="pref_delivery_report_sms"
|
||||
android:summary="@string/preferences__request_a_delivery_report_for_each_sms_message_you_send"
|
||||
android:title="@string/preferences__sms_delivery_reports" />
|
||||
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/preferences__notifications">
|
||||
<CheckBoxPreference android:key="pref_key_enable_notifications"
|
||||
|
Reference in New Issue
Block a user