WIP: Add border to message bubbles on Android 4.

This commit is contained in:
akwizgran
2018-08-06 15:56:05 +01:00
parent 474de25e61
commit 127b9ef244
5 changed files with 25 additions and 16 deletions

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke android:width="1dp" android:color="@color/msg_border"/>
<corners
android:bottomLeftRadius="@dimen/message_bubble_radius_big"
android:bottomRightRadius="@dimen/message_bubble_radius_big"
android:topLeftRadius="@dimen/message_bubble_radius_small"
android:topRightRadius="@dimen/message_bubble_radius_big"/>
</shape>

View File

@@ -4,7 +4,12 @@
xmlns:tools="http://schemas.android.com/tools"
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:layout_marginTop="@dimen/message_bubble_margin"
android:padding="1px"
android:background="@drawable/msg_in_border"
android:orientation="vertical">
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
@@ -13,21 +18,14 @@
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:background="@drawable/msg_in_top"
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:elevation="@dimen/message_bubble_elevation">
android:background="@drawable/notice_in_bottom">
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/text"

View File

@@ -4,7 +4,12 @@
xmlns:tools="http://schemas.android.com/tools"
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:layout_marginTop="@dimen/message_bubble_margin"
android:padding="1px"
android:background="@drawable/msg_in_border"
android:orientation="vertical">
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
@@ -12,10 +17,7 @@
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:background="@drawable/msg_in_top"
android:elevation="@dimen/message_bubble_elevation"
android:textColor="?android:attr/textColorPrimary"
tools:text="Short message"/>
@@ -23,11 +25,7 @@
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:elevation="@dimen/message_bubble_elevation">
android:background="@drawable/notice_in_bottom">
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/text"

View File

@@ -12,6 +12,7 @@
<color name="msg_out">@color/briar_blue_elio_light</color>
<color name="notice_in">@color/briar_blue_dark</color>
<color name="notice_out">@color/briar_blue_elio</color>
<color name="msg_border">@color/briar_blue_very_dark</color>
<color name="window_background">@color/briar_blue_very_dark</color>
<color name="card_background">@color/briar_blue_dark</color>

View File

@@ -37,6 +37,7 @@
<color name="msg_out">@color/briar_blue_elio_light</color>
<color name="notice_in">@color/briar_blue_grey</color>
<color name="notice_out">@color/briar_blue_elio</color>
<color name="msg_border">@color/briar_blue_dark</color>
<!-- text colors -->
<color name="briar_text_link">@color/briar_blue_light</color>