New private message bubbles

This gets rid of all those pesky 9-Patch drawables
This commit is contained in:
Torsten Grote
2018-08-02 13:13:42 -03:00
parent 8e732d880f
commit 4163731ec3
57 changed files with 214 additions and 43 deletions

View File

@@ -5,29 +5,29 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/message_bubble_margin"
android:layout_marginLeft="@dimen/message_bubble_margin_tail"
android:layout_marginRight="@dimen/message_bubble_margin_non_tail"
android:layout_marginTop="@dimen/message_bubble_margin"
android:background="@drawable/msg_in"
android:elevation="@dimen/message_bubble_elevation"
android:orientation="vertical">
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/text"
style="@style/TextMessage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?android:attr/textColorPrimary"
android:textIsSelectable="true"
android:textSize="@dimen/text_size_medium"
tools:text="Short message"/>
<TextView
android:id="@+id/time"
style="@style/TextMessage.Timestamp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right|end"
android:layout_marginTop="@dimen/message_bubble_timestamp_margin"
android:maxLines="1"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/text_size_tiny"
tools:text="Dec 24, 13:37"/>
</LinearLayout>

View File

@@ -11,30 +11,31 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right|end"
android:layout_marginBottom="@dimen/message_bubble_margin"
android:layout_marginLeft="@dimen/message_bubble_margin_non_tail"
android:layout_marginRight="@dimen/message_bubble_margin_tail"
android:background="@drawable/msg_out">
android:layout_marginTop="@dimen/message_bubble_margin"
android:background="@drawable/msg_out"
android:elevation="@dimen/message_bubble_elevation">
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/text"
style="@style/TextMessage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/briar_text_primary_inverse"
android:textIsSelectable="true"
android:textSize="@dimen/text_size_medium"
tools:text="This is a long long long message that spans over several lines.\n\nIt ends here."/>
<TextView
android:id="@+id/time"
style="@style/TextMessage.Timestamp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/text"
android:layout_marginTop="@dimen/message_bubble_timestamp_margin"
android:maxLines="1"
android:textColor="@color/private_message_date_inverse"
android:textSize="@dimen/text_size_tiny"
tools:text="Dec 24, 13:37"/>
<ImageView

View File

@@ -8,46 +8,44 @@
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/msgText"
style="@style/TextMessage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="left|start"
android:layout_marginLeft="@dimen/message_bubble_margin_tail"
android:layout_marginRight="@dimen/message_bubble_margin_non_tail"
android:layout_marginTop="@dimen/message_bubble_margin"
android:background="@drawable/msg_in_top"
android:textColor="?android:attr/textColorPrimary"
android:textIsSelectable="true"
android:textSize="@dimen/text_size_medium"
android:elevation="@dimen/message_bubble_elevation"
tools:text="Short message"/>
<RelativeLayout
android:id="@+id/layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/message_bubble_margin"
android:layout_marginLeft="@dimen/message_bubble_margin_tail"
android:layout_marginRight="@dimen/message_bubble_margin_non_tail"
android:background="@drawable/notice_in_bottom">
android:background="@drawable/notice_in_bottom"
android:elevation="@dimen/message_bubble_elevation">
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/text"
style="@style/TextMessage.Notice"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minWidth="80dp"
android:textColor="?android:attr/textColorSecondary"
android:textIsSelectable="true"
android:textSize="@dimen/text_size_medium"
android:textStyle="italic"
tools:text="@string/forum_invitation_received"/>
<TextView
android:id="@+id/time"
style="@style/TextMessage.Timestamp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignEnd="@+id/text"
android:layout_alignRight="@+id/text"
android:layout_below="@+id/text"
android:layout_marginTop="@dimen/message_bubble_timestamp_margin"
android:textColor="?android:attr/textColorTertiary"
android:textSize="@dimen/text_size_tiny"
tools:text="Dec 24, 13:37"/>
</RelativeLayout>

View File

@@ -9,44 +9,45 @@
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/msgText"
style="@style/TextMessage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/message_bubble_margin_non_tail"
android:layout_marginRight="@dimen/message_bubble_margin_tail"
android:layout_marginTop="@dimen/message_bubble_margin"
android:background="@drawable/msg_out_top"
android:elevation="@dimen/message_bubble_elevation"
android:textColor="@color/briar_text_primary_inverse"
android:textIsSelectable="true"
android:textSize="@dimen/text_size_medium"
tools:text="This is a long long long message that spans over several lines.\n\nIt ends here."/>
<RelativeLayout
android:id="@+id/layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/message_bubble_margin"
android:layout_marginLeft="@dimen/message_bubble_margin_non_tail"
android:layout_marginRight="@dimen/message_bubble_margin_tail"
android:background="@drawable/notice_out_bottom">
android:background="@drawable/notice_out_bottom"
android:elevation="@dimen/message_bubble_elevation">
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/text"
style="@style/TextMessage.Notice"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?android:attr/textColorSecondary"
android:textIsSelectable="true"
android:textSize="@dimen/text_size_medium"
android:textStyle="italic"
android:textColor="@color/private_message_date_inverse"
tools:text="@string/introduction_request_received"/>
<TextView
android:id="@+id/time"
style="@style/TextMessage.Timestamp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/text"
android:layout_marginTop="@dimen/message_bubble_timestamp_margin"
android:textColor="?android:attr/textColorTertiary"
android:textSize="@dimen/text_size_tiny"
android:textColor="@color/private_message_date_inverse"
tools:text="Dec 24, 13:37"/>
<android.support.v7.widget.AppCompatImageView
@@ -57,7 +58,7 @@
android:layout_marginLeft="@dimen/margin_medium"
android:layout_toEndOf="@+id/time"
android:layout_toRightOf="@+id/time"
app:tint="?attr/colorControlNormal"
app:tint="@color/private_message_date_inverse"
tools:ignore="ContentDescription"
tools:src="@drawable/message_delivered"/>

View File

@@ -8,45 +8,43 @@
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/msgText"
style="@style/TextMessage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/message_bubble_margin_tail"
android:layout_marginRight="@dimen/message_bubble_margin_non_tail"
android:layout_marginTop="@dimen/message_bubble_margin"
android:background="@drawable/msg_in_top"
android:elevation="@dimen/message_bubble_elevation"
android:textColor="?android:attr/textColorPrimary"
android:textIsSelectable="true"
android:textSize="@dimen/text_size_medium"
tools:text="Short message"/>
<RelativeLayout
android:id="@+id/layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/message_bubble_margin"
android:layout_marginLeft="@dimen/message_bubble_margin_tail"
android:layout_marginRight="@dimen/message_bubble_margin_non_tail"
android:background="@drawable/notice_in_bottom">
android:background="@drawable/notice_in_bottom"
android:elevation="@dimen/message_bubble_elevation">
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/text"
style="@style/TextMessage.Notice"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minWidth="80dp"
android:textColor="?android:attr/textColorSecondary"
android:textIsSelectable="true"
android:textSize="@dimen/text_size_medium"
android:textStyle="italic"
tools:text="@string/introduction_request_received"/>
<TextView
android:id="@+id/time"
style="@style/TextMessage.Timestamp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignEnd="@+id/text"
android:layout_alignRight="@+id/text"
android:layout_below="@+id/acceptButton"
android:layout_marginTop="@dimen/message_bubble_timestamp_margin"
android:textColor="?android:attr/textColorTertiary"
android:textSize="@dimen/text_size_tiny"
tools:text="Dec 24, 13:37"/>
<Button