New private message bubbles

This gets rid of all those pesky 9-Patch drawables
parent 8e732d88
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<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"/>
<padding
android:bottom="@dimen/message_bubble_padding_bottom"
android:left="@dimen/message_bubble_padding_sides"
android:right="@dimen/message_bubble_padding_sides"
android:top="@dimen/message_bubble_padding_top"/>
<solid
android:color="@color/msg_in"/>
</shape>
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp"
android:topLeftRadius="@dimen/message_bubble_radius_small"
android:topRightRadius="@dimen/message_bubble_radius_big"/>
<padding
android:bottom="@dimen/message_bubble_padding_top"
android:left="@dimen/message_bubble_padding_sides"
android:right="@dimen/message_bubble_padding_sides"
android:top="@dimen/message_bubble_padding_top"/>
<solid
android:color="@color/msg_in"/>
</shape>
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners
android:bottomLeftRadius="@dimen/message_bubble_radius_big"
android:bottomRightRadius="@dimen/message_bubble_radius_big"
android:topLeftRadius="@dimen/message_bubble_radius_big"
android:topRightRadius="@dimen/message_bubble_radius_small"/>
<padding
android:bottom="@dimen/message_bubble_padding_bottom"
android:left="@dimen/message_bubble_padding_sides"
android:right="@dimen/message_bubble_padding_sides"
android:top="@dimen/message_bubble_padding_top"/>
<solid
android:color="@color/msg_out"/>
</shape>
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp"
android:topLeftRadius="@dimen/message_bubble_radius_big"
android:topRightRadius="@dimen/message_bubble_radius_small"/>
<padding
android:bottom="@dimen/message_bubble_padding_top"
android:left="@dimen/message_bubble_padding_sides"
android:right="@dimen/message_bubble_padding_sides"
android:top="@dimen/message_bubble_padding_top"/>
<solid
android:color="@color/msg_out"/>
</shape>
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<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"/>
<padding
android:bottom="@dimen/message_bubble_padding_bottom"
android:left="@dimen/message_bubble_padding_sides"
android:right="@dimen/message_bubble_padding_sides"
android:top="@dimen/message_bubble_padding_top"/>
<solid
android:color="@color/notice_in"/>
</shape>
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners
android:bottomLeftRadius="@dimen/message_bubble_radius_big"
android:bottomRightRadius="@dimen/message_bubble_radius_big"
android:topLeftRadius="0dp"
android:topRightRadius="0dp"/>
<padding
android:bottom="@dimen/message_bubble_padding_bottom"
android:left="@dimen/message_bubble_padding_sides"
android:right="@dimen/message_bubble_padding_sides"
android:top="@dimen/message_bubble_padding_bottom"/>
<solid
android:color="@color/notice_in"/>
</shape>
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners
android:bottomLeftRadius="@dimen/message_bubble_radius_big"
android:bottomRightRadius="@dimen/message_bubble_radius_big"
android:topLeftRadius="@dimen/message_bubble_radius_big"
android:topRightRadius="@dimen/message_bubble_radius_small"/>
<padding
android:bottom="@dimen/message_bubble_padding_bottom"
android:left="@dimen/message_bubble_padding_sides"
android:right="@dimen/message_bubble_padding_sides"
android:top="@dimen/message_bubble_padding_top"/>
<solid
android:color="@color/notice_out"/>
</shape>
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners
android:bottomLeftRadius="@dimen/message_bubble_radius_big"
android:bottomRightRadius="@dimen/message_bubble_radius_big"
android:topLeftRadius="0dp"
android:topRightRadius="0dp"/>
<padding
android:bottom="@dimen/message_bubble_padding_bottom"
android:left="@dimen/message_bubble_padding_sides"
android:right="@dimen/message_bubble_padding_sides"
android:top="@dimen/message_bubble_padding_bottom"/>
<solid
android:color="@color/notice_out"/>
</shape>
......@@ -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>
......@@ -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
......
......@@ -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>
......
......@@ -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"/>
......
......@@ -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
......
......@@ -9,6 +9,11 @@
<color name="color_primary">#ffffff</color>
<color name="msg_in">#2D3E50</color>
<color name="msg_out">#3C80A9</color>
<color name="notice_in">@color/briar_blue_dark</color>
<color name="notice_out">#236087</color>
<color name="window_background">@color/briar_blue_very_dark</color>
<color name="card_background">@color/briar_blue_dark</color>
<color name="item_background_highlight">@color/briar_blue</color>
......
......@@ -8,7 +8,7 @@
<color name="briar_green_light">#95D220</color>
<color name="briar_link">#2A93C6</color>
<color name="window_background">#fffafafa</color>
<color name="window_background">#E3EBEF</color>
<color name="card_background">@color/cardview_light_background</color>
<color name="item_background_highlight">#DCDCDC</color>
<color name="action_bar_text">#FFFFFF</color>
......@@ -22,6 +22,11 @@
<color name="color_primary">#dd000000</color>
<color name="msg_in">#FFFFFF</color>
<color name="msg_out">#3C7FA9</color>
<color name="notice_in">#EBEFF2</color>
<color name="notice_out">#236087</color>
<!-- text colors -->
<color name="briar_text_link">@color/briar_link</color>
<color name="briar_text_primary">#df000000</color>
......
......@@ -38,9 +38,17 @@
<dimen name="unread_bubble_padding_horizontal">6dp</dimen>
<dimen name="unread_bubble_size">19dp</dimen>
<dimen name="message_bubble_margin_tail">3dp</dimen>
<dimen name="message_bubble_radius_big">16dp</dimen>
<dimen name="message_bubble_radius_small">4dp</dimen>
<dimen name="message_bubble_margin">6dp</dimen>
<dimen name="message_bubble_padding_sides">12dp</dimen>
<dimen name="message_bubble_padding_top">6dp</dimen>
<dimen name="message_bubble_padding_bottom">4dp</dimen>
<dimen name="message_bubble_timestamp_margin">4dp</dimen>
<dimen name="message_bubble_elevation">2dp</dimen>
<dimen name="message_bubble_margin_tail">8dp</dimen>
<dimen name="message_bubble_margin_non_tail">30dp</dimen>
<dimen name="message_bubble_timestamp_margin">7dp</dimen>
<dimen name="forum_nested_line_width">2dp</dimen>
<dimen name="forum_nested_indicator">24dp</dimen>
......
......@@ -81,6 +81,25 @@
<item name="civ_border_color">?android:attr/textColorSecondary</item>
</style>
<style name="TextMessage">
<item name="android:textIsSelectable">true</item>
<item name="android:textSize">@dimen/text_size_medium</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
</style>
<style name="TextMessage.Notice">
<item name="android:textIsSelectable">true</item>
<item name="android:textSize">@dimen/text_size_tiny</item>
<item name="android:textColor">?android:attr/textColorSecondary</item>
<item name="android:textStyle">italic</item>
</style>
<style name="TextMessage.Timestamp">
<item name="android:textSize">@dimen/text_size_tiny</item>
<item name="android:textColor">?android:attr/textColorTertiary</item>
<item name="android:maxLines">1</item>
</style>
<style name="DiscussionLevelIndicator">
<item name="android:layout_marginLeft">4dp</item>
<item name="android:background">@color/thread_indicator</item>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment