mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-30 13:35:18 +00:00
embrace the darkness, don't open quickcontact for groups
// FREEBIE
This commit is contained in:
parent
19dddd7adf
commit
0cdc6fd87d
19
res/drawable/conversation_item_received_shape_dark.xml
Normal file
19
res/drawable/conversation_item_received_shape_dark.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 android:shape="rectangle">
|
||||
<solid android:color="#ff222222" />
|
||||
<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="#ff333333" />
|
||||
<!--stroke android:width="0.5dp" android:color="#03000000" /-->
|
||||
<corners android:radius="@dimen/conversation_item_corner_radius" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</layer-list>
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item>
|
||||
<rotate
|
||||
android:fromDegrees="45"
|
||||
android:toDegrees="45"
|
||||
android:pivotX="110%"
|
||||
android:pivotY="120%" >
|
||||
<shape
|
||||
android:shape="rectangle" >
|
||||
<solid
|
||||
android:color="#ff333333" />
|
||||
</shape>
|
||||
</rotate>
|
||||
</item>
|
||||
</layer-list>
|
@ -10,10 +10,10 @@
|
||||
|
||||
<item android:bottom="@dimen/conversation_item_drop_shadow_dist">
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#ff64a926" />
|
||||
<solid android:color="@color/conversation_item_sent_background_light" />
|
||||
<!--stroke android:width="0.5dp" android:color="#03000000" /-->
|
||||
<corners android:radius="@dimen/conversation_item_corner_radius" /> <!-- android:topRightRadius="0dp" -->
|
||||
<corners android:radius="@dimen/conversation_item_corner_radius" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</layer-list>
|
||||
</layer-list>
|
||||
|
19
res/drawable/conversation_item_sent_shape_dark.xml
Normal file
19
res/drawable/conversation_item_sent_shape_dark.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 android:shape="rectangle">
|
||||
<solid android:color="#ff003c00" />
|
||||
<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_sent_background_dark" />
|
||||
<!--stroke android:width="0.5dp" android:color="#03000000" /-->
|
||||
<corners android:radius="@dimen/conversation_item_corner_radius" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
</layer-list>
|
@ -9,7 +9,7 @@
|
||||
<shape
|
||||
android:shape="rectangle" >
|
||||
<solid
|
||||
android:color="#ff64a926" />
|
||||
android:color="@color/conversation_item_sent_background_light" />
|
||||
</shape>
|
||||
</rotate>
|
||||
</item>
|
||||
|
16
res/drawable/conversation_item_sent_triangle_shape_dark.xml
Normal file
16
res/drawable/conversation_item_sent_triangle_shape_dark.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item>
|
||||
<rotate
|
||||
android:fromDegrees="45"
|
||||
android:toDegrees="45"
|
||||
android:pivotX="0%"
|
||||
android:pivotY="-30%">
|
||||
<shape
|
||||
android:shape="rectangle" >
|
||||
<solid
|
||||
android:color="@color/conversation_item_sent_background_dark" />
|
||||
</shape>
|
||||
</rotate>
|
||||
</item>
|
||||
</layer-list>
|
13
res/drawable/conversation_list_divider_shape_dark.xml
Normal file
13
res/drawable/conversation_list_divider_shape_dark.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?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="@color/conversation_list_item_background_read_dark" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:left="83dp" android:right="10dp">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#22ffffff" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
@ -75,7 +75,7 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:background="?conversation_sent_text_primary_color">
|
||||
android:background="?conversation_editor_background">
|
||||
|
||||
<org.thoughtcrime.securesms.components.EmojiToggle
|
||||
android:id="@+id/emoji_toggle"
|
||||
|
@ -38,13 +38,13 @@
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_alignRight="@id/contact_photo"
|
||||
android:background="@drawable/conversation_item_received_triangle_shape" />
|
||||
android:background="?conversation_item_received_triangle_background" />
|
||||
|
||||
<LinearLayout android:id="@+id/conversation_item_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_toRightOf="@id/triangle_tick"
|
||||
android:background="@drawable/conversation_item_received_shape"
|
||||
android:background="?conversation_item_received_background"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
|
@ -36,7 +36,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="@drawable/conversation_item_sent_shape"
|
||||
android:background="?conversation_item_sent_background"
|
||||
android:paddingRight="10dip"
|
||||
android:paddingLeft="10dip"
|
||||
android:layout_marginLeft="50dp"
|
||||
@ -171,7 +171,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:background="@drawable/conversation_item_sent_triangle_shape"
|
||||
android:background="?conversation_item_sent_triangle_background"
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginTop="12dp"
|
||||
|
@ -11,7 +11,7 @@
|
||||
android:drawSelectorOnTop="false"
|
||||
android:scrollbarStyle="insideOverlay"
|
||||
android:fadingEdgeLength="16dip"
|
||||
android:divider="@drawable/conversation_list_divider_shape"
|
||||
android:divider="?conversation_list_item_divider"
|
||||
android:dividerHeight="1px" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
@ -7,6 +7,7 @@
|
||||
<attr name="conversation_list_item_contact_color" format="reference|color"/>
|
||||
<attr name="conversation_list_item_subject_color" format="reference|color"/>
|
||||
<attr name="conversation_list_item_date_color" format="reference|color"/>
|
||||
<attr name="conversation_list_item_divider" format="reference"/>
|
||||
|
||||
<attr name="conversation_sent_card_background" format="reference|color"/>
|
||||
<attr name="conversation_group_member_name" format="reference|color"/>
|
||||
@ -28,6 +29,11 @@
|
||||
<attr name="conversation_emoji_toggle" format="reference"/>
|
||||
<attr name="conversation_keyboard_toggle" format="reference"/>
|
||||
|
||||
<attr name="conversation_item_received_background" format="reference" />
|
||||
<attr name="conversation_item_received_triangle_background" format="reference" />
|
||||
<attr name="conversation_item_sent_background" format="reference" />
|
||||
<attr name="conversation_item_sent_triangle_background" format="reference" />
|
||||
|
||||
<attr name="navigation_drawer_background" format="reference|color"/>
|
||||
<attr name="navigation_drawer_text_color" format="color"/>
|
||||
<attr name="navigation_drawer_icons" format="reference"/>
|
||||
|
@ -13,4 +13,8 @@
|
||||
|
||||
<color name="card_background_active">#9933b5e5</color>
|
||||
|
||||
<color name="conversation_item_sent_background_dark">#ff284e0a</color>
|
||||
<color name="conversation_item_sent_background_light">#ff64a926</color>
|
||||
<color name="conversation_item_received_background_dark">#ff284e0a</color>
|
||||
<color name="conversation_item_received_background_light">#ff284e0a</color>
|
||||
</resources>
|
@ -48,6 +48,7 @@
|
||||
<string name="ConversationItem_received_and_processed_key_exchange_message">Received and processed key exchange message.</string>
|
||||
<string name="ConversationItem_error_received_stale_key_exchange_message">Error, received stale key exchange message.</string>
|
||||
<string name="ConversationItem_received_key_exchange_message_click_to_process">Received key exchange message, click to process.</string>
|
||||
<string name="ConversationItem_received_plaintext_message_click_to_terminate">Received a plaintext SMS while you have a secure session open. If they don\'t have a session open, messages you send will appear as garbled text. Click to terminate secure session.</string>
|
||||
<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>
|
||||
|
@ -9,6 +9,20 @@
|
||||
<item name="android:windowAnimationStyle">@null</item>
|
||||
</style>
|
||||
|
||||
<!-- the theme applied to the application or activity -->
|
||||
<style name="TextSecure.Dark"
|
||||
parent="@style/Theme.Sherlock">
|
||||
<item name="android:actionBarStyle">@style/TextSecure.DarkActionBar</item>
|
||||
<item name="actionBarStyle">@style/TextSecure.DarkActionBar</item>
|
||||
</style>
|
||||
|
||||
<!-- ActionBar styles -->
|
||||
<style name="TextSecure.DarkActionBar"
|
||||
parent="@style/Widget.Sherlock.ActionBar">
|
||||
<item name="android:background">#ff111111</item>
|
||||
<item name="background">#ff111111</item>
|
||||
</style>
|
||||
|
||||
<style name="transparent_progress">
|
||||
<item name="android:windowFrame">@null</item>
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
|
@ -8,6 +8,7 @@
|
||||
<item name="conversation_list_item_contact_color">#FF444444</item>
|
||||
<item name="conversation_list_item_subject_color">#FF444444</item>
|
||||
<item name="conversation_list_item_date_color">#ff999999</item>
|
||||
<item name="conversation_list_item_divider">@drawable/conversation_list_divider_shape</item>
|
||||
|
||||
<item name="actionbar_icon">@drawable/actionbar_icon_holo_light</item>
|
||||
<item name="lower_right_divet">@drawable/divet_lower_right_dark</item>
|
||||
@ -27,6 +28,11 @@
|
||||
<item name="conversation_emoji_toggle">@drawable/ic_emoji_dark</item>
|
||||
<item name="conversation_keyboard_toggle">@drawable/ic_ime_dark</item>
|
||||
|
||||
<item name="conversation_item_received_background">@drawable/conversation_item_received_shape</item>
|
||||
<item name="conversation_item_received_triangle_background">@drawable/conversation_item_received_triangle_shape</item>
|
||||
<item name="conversation_item_sent_background">@drawable/conversation_item_sent_shape</item>
|
||||
<item name="conversation_item_sent_triangle_background">@drawable/conversation_item_sent_triangle_shape</item>
|
||||
|
||||
<item name="menu_new_conversation_icon">@drawable/ic_action_new_holo_light</item>
|
||||
<item name="menu_new_group_icon">@drawable/ic_action_add_group_holo_light</item>
|
||||
<item name="menu_group_icon">@drawable/ic_menu_groups_holo_light</item>
|
||||
@ -53,7 +59,7 @@
|
||||
<item name="navigation_drawer_shadow">@drawable/drawer_shadow_light</item>
|
||||
</style>
|
||||
|
||||
<style name="TextSecure.DarkTheme" parent="@style/Theme.Sherlock">
|
||||
<style name="TextSecure.DarkTheme" parent="@style/TextSecure.Dark">
|
||||
<item name="conversation_list_item_background_read">@drawable/conversation_list_item_background_read_dark</item>
|
||||
<item name="conversation_list_item_background_unread">@drawable/conversation_list_item_background_unread_dark</item>
|
||||
<item name="conversation_list_item_background_selected">@drawable/list_selected_holo_dark</item>
|
||||
@ -61,18 +67,24 @@
|
||||
<item name="conversation_list_item_contact_color">#ffdddddd</item>
|
||||
<item name="conversation_list_item_subject_color">#ffdddddd</item>
|
||||
<item name="conversation_list_item_date_color">#ffdddddd</item>
|
||||
<item name="conversation_list_item_divider">@drawable/conversation_list_divider_shape_dark</item>
|
||||
|
||||
<item name="conversation_group_member_name">#99ffffff</item>
|
||||
<item name="conversation_sent_text_primary_color">#ffeeeeee</item>
|
||||
<item name="conversation_sent_text_secondary_color">#44000000</item>
|
||||
<item name="conversation_received_text_primary_color">#ff111111</item>
|
||||
<item name="conversation_received_text_secondary_color">#33000000</item>
|
||||
<item name="conversation_sent_text_secondary_color">#44eeeeee</item>
|
||||
<item name="conversation_received_text_primary_color">#ffeeeeee</item>
|
||||
<item name="conversation_received_text_secondary_color">#44eeeeee</item>
|
||||
|
||||
<item name="conversation_item_received_background">@drawable/conversation_item_received_shape_dark</item>
|
||||
<item name="conversation_item_received_triangle_background">@drawable/conversation_item_received_triangle_shape_dark</item>
|
||||
<item name="conversation_item_sent_background">@drawable/conversation_item_sent_shape_dark</item>
|
||||
<item name="conversation_item_sent_triangle_background">@drawable/conversation_item_sent_triangle_shape_dark</item>
|
||||
|
||||
<item name="actionbar_icon">@drawable/actionbar_icon_holo_dark</item>
|
||||
<item name="lower_right_divet">@drawable/divet_lower_right_light</item>
|
||||
|
||||
<item name="conversation_background">@color/black</item>
|
||||
<item name="conversation_editor_background">@color/black</item>
|
||||
<item name="conversation_editor_background">#ff222222</item>
|
||||
<item name="conversation_editor_text_color">@color/edit_text_dark_theme</item>
|
||||
<item name="conversation_send_button">@drawable/ic_send_holo_dark</item>
|
||||
<item name="conversation_send_secure_button">@drawable/ic_send_holo_dark_encrypted</item>
|
||||
|
@ -30,6 +30,7 @@ import android.text.SpannableStringBuilder;
|
||||
import android.text.TextUtils;
|
||||
import android.text.style.StyleSpan;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
@ -54,6 +55,7 @@ import java.util.Set;
|
||||
public class ConversationListItem extends RelativeLayout
|
||||
implements Recipient.RecipientModifiedListener
|
||||
{
|
||||
private final static String TAG = ConversationListItem.class.getSimpleName();
|
||||
|
||||
private Context context;
|
||||
private Set<Long> selectedThreads;
|
||||
@ -130,17 +132,21 @@ public class ConversationListItem extends RelativeLayout
|
||||
if (recipient == null) return;
|
||||
|
||||
contactPhotoImage.setImageBitmap(BitmapUtil.getCircleCroppedBitmap(recipient.getContactPhoto()));
|
||||
contactPhotoImage.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (recipient.getContactUri() != null) {
|
||||
QuickContact.showQuickContact(context, contactPhotoImage, recipient.getContactUri(), QuickContact.MODE_LARGE, null);
|
||||
} else {
|
||||
Intent intent = new Intent(Intents.SHOW_OR_CREATE_CONTACT, Uri.fromParts("tel", recipient.getNumber(), null));
|
||||
context.startActivity(intent);
|
||||
if (!recipient.isGroupRecipient()) {
|
||||
contactPhotoImage.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (recipient.getContactUri() != null) {
|
||||
QuickContact.showQuickContact(context, contactPhotoImage, recipient.getContactUri(), QuickContact.MODE_LARGE, null);
|
||||
} else {
|
||||
Intent intent = new Intent(Intents.SHOW_OR_CREATE_CONTACT, Uri.fromParts("tel", recipient.getNumber(), null));
|
||||
context.startActivity(intent);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
contactPhotoImage.setOnClickListener(null);
|
||||
}
|
||||
}
|
||||
|
||||
private void setBackground(boolean read, boolean batch) {
|
||||
|
Loading…
Reference in New Issue
Block a user