Add drop shadows and roundier corners to new bubbles.

// FREEBIE
master
Jake McGinty 2015-06-29 14:38:52 -07:00 committed by Moxie Marlinspike
parent db9656c70c
commit 99c9c73c9d
13 changed files with 14 additions and 27 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 305 B

After

Width:  |  Height:  |  Size: 554 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 297 B

After

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 B

After

Width:  |  Height:  |  Size: 434 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 240 B

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 423 B

After

Width:  |  Height:  |  Size: 787 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 418 B

After

Width:  |  Height:  |  Size: 908 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 577 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 584 B

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -47,12 +47,8 @@
<org.thoughtcrime.securesms.components.ThumbnailView
android:id="@+id/image_view"
android:layout_width="wrap_content"
android:layout_width="@dimen/media_bubble_height"
android:layout_height="@dimen/media_bubble_height"
android:layout_marginLeft="4dip"
android:layout_marginTop="4dip"
android:layout_marginRight="4dip"
android:layout_gravity="center"
android:scaleType="centerCrop"
android:adjustViewBounds="true"
android:contentDescription="@string/conversation_item__mms_image_description"
@ -66,9 +62,8 @@
android:id="@+id/conversation_item_body"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="5dip"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingLeft="4dp"
android:paddingRight="4dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?conversation_received_text_primary_color"
android:textSize="16sp"
@ -101,9 +96,8 @@
<LinearLayout android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="2dip"
android:paddingLeft="8dp"
android:paddingRight="5dp"
android:paddingBottom="5dp"
android:paddingLeft="4dp"
android:paddingRight="4dp"
android:orientation="horizontal"
android:gravity="left">

View File

@ -50,18 +50,16 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:paddingRight="15dip"
android:paddingLeft="5dip"
android:layout_marginLeft="50dp"
android:layout_marginRight="12dp"
android:layout_marginRight="5dp"
android:background="@drawable/sent_bubble"
android:orientation="vertical">
<org.thoughtcrime.securesms.components.ThumbnailView
android:id="@+id/image_view"
android:layout_width="wrap_content"
android:layout_width="@dimen/media_bubble_height"
android:layout_height="@dimen/media_bubble_height"
android:layout_marginTop="4dip"
android:layout_marginBottom="5dp"
android:layout_gravity="center"
android:scaleType="centerCrop"
android:adjustViewBounds="true"
@ -77,7 +75,8 @@
android:autoLink="all"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="5dip"
android:paddingLeft="4dp"
android:paddingRight="4dp"
android:linksClickable="true"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?conversation_item_sent_text_primary_color"
@ -111,7 +110,8 @@
<LinearLayout android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="0dip"
android:paddingLeft="4dp"
android:paddingRight="4dp"
android:layout_gravity="right">
<TextView android:id="@+id/group_message_status"
@ -137,7 +137,6 @@
android:textColor="?conversation_item_sent_text_secondary_color"
android:textSize="@dimen/conversation_item_date_text_size"
android:paddingTop="1dip"
android:paddingBottom="5dp"
tools:text="30 mins" />
<FrameLayout android:id="@+id/pending_indicator_stub"

View File

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools">
<style name="TextSecure.LightNoActionBar" parent="@style/Theme.AppCompat.Light.NoActionBar">

View File

@ -191,7 +191,7 @@ public class ConversationItem extends LinearLayout {
int[] attributes = new int[]{R.attr.conversation_item_bubble_background};
TypedArray colors = context.obtainStyledAttributes(attributes);
bodyBubble.getBackground().setColorFilter(colors.getColor(0, 0xFFFFFF), PorterDuff.Mode.SRC_ATOP);
bodyBubble.getBackground().setColorFilter(colors.getColor(0, 0xFFFFFFFF), PorterDuff.Mode.MULTIPLY);
colors.recycle();
}

View File

@ -99,13 +99,6 @@ public class ThumbnailView extends RoundedImageView {
if (isContextValid()) Glide.clear(this);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
View dv = ((Activity) this.getContext()).getWindow().getDecorView();
int size = Math.min(dv.getWidth(), dv.getHeight()) * 55 / 100;
setMeasuredDimension(size, size);
}
@TargetApi(VERSION_CODES.JELLY_BEAN_MR1)
private boolean isContextValid() {
return !(getContext() instanceof Activity) ||