mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-18 07:11:58 +03:00
Notices transparent as done on desktop
Change-Id: I4768180eebcaa82bc64e5dcca9694ba808467d94
This commit is contained in:
parent
f3874be337
commit
e8a2b14055
12 changed files with 16 additions and 501 deletions
|
@ -85,11 +85,13 @@ function create_msg_bubble() {
|
||||||
|
|
||||||
for is_outgoing in 0 1; do
|
for is_outgoing in 0 1; do
|
||||||
for is_rtl in 0 1; do
|
for is_rtl in 0 1; do
|
||||||
for is_notice in 0 1; do
|
# Notices are handled via transparency and do not need own drawables right now
|
||||||
|
is_notice=0
|
||||||
|
#for is_notice in 0 1; do
|
||||||
for has_tail in 0 1; do
|
for has_tail in 0 1; do
|
||||||
create_msg_bubble "$is_outgoing" "$is_rtl" "$is_notice" "$has_tail"
|
create_msg_bubble "$is_outgoing" "$is_rtl" "$is_notice" "$has_tail"
|
||||||
done
|
done
|
||||||
done
|
#done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
@ -456,36 +456,21 @@ abstract class AbsMessageItem<H : AbsMessageItem.Holder> : AbsBaseMessageItem<H>
|
||||||
val longPadding: Int
|
val longPadding: Int
|
||||||
val shortPadding: Int
|
val shortPadding: Int
|
||||||
if (BubbleThemeUtils.drawsActualBubbles(bubbleStyle)) {
|
if (BubbleThemeUtils.drawsActualBubbles(bubbleStyle)) {
|
||||||
val bubbleRes = if (attributes.isNotice) { // notice
|
val bubbleRes = if (attributes.informationData.showInformation) { // tail
|
||||||
if (attributes.informationData.showInformation) { // tail
|
if (reverseBubble) { // outgoing
|
||||||
if (reverseBubble) { // outgoing
|
R.drawable.msg_bubble_text_outgoing
|
||||||
R.drawable.msg_bubble_notice_outgoing
|
} else { // incoming
|
||||||
} else { // incoming
|
R.drawable.msg_bubble_text_incoming
|
||||||
R.drawable.msg_bubble_notice_incoming
|
|
||||||
}
|
|
||||||
} else { // notail
|
|
||||||
if (reverseBubble) { // outgoing
|
|
||||||
R.drawable.msg_bubble_notice_outgoing_notail
|
|
||||||
} else { // incoming
|
|
||||||
R.drawable.msg_bubble_notice_incoming_notail
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else { // text
|
} else { // notail
|
||||||
if (attributes.informationData.showInformation) { // tail
|
if (reverseBubble) { // outgoing
|
||||||
if (reverseBubble) { // outgoing
|
R.drawable.msg_bubble_text_outgoing_notail
|
||||||
R.drawable.msg_bubble_text_outgoing
|
} else { // incoming
|
||||||
} else { // incoming
|
R.drawable.msg_bubble_text_incoming_notail
|
||||||
R.drawable.msg_bubble_text_incoming
|
|
||||||
}
|
|
||||||
} else { // notail
|
|
||||||
if (reverseBubble) { // outgoing
|
|
||||||
R.drawable.msg_bubble_text_outgoing_notail
|
|
||||||
} else { // incoming
|
|
||||||
R.drawable.msg_bubble_text_incoming_notail
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bubbleView.setBackgroundResource(bubbleRes)
|
bubbleView.setBackgroundResource(bubbleRes)
|
||||||
|
bubbleView.alpha = if (attributes.isNotice) 0.6f else 1f
|
||||||
longPadding = 20
|
longPadding = 20
|
||||||
shortPadding = 8
|
shortPadding = 8
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -121,10 +121,6 @@ abstract class MessageTextItem : AbsMessageItem<MessageTextItem.Holder>() {
|
||||||
holder.messageView.onClick(attributes.itemClickListener)
|
holder.messageView.onClick(attributes.itemClickListener)
|
||||||
holder.messageView.onLongClickIgnoringLinks(attributes.itemLongClickListener)
|
holder.messageView.onLongClickIgnoringLinks(attributes.itemLongClickListener)
|
||||||
|
|
||||||
holder.messageView.setTextColor(ColorProvider(holder.messageView.context).getColorFromAttribute(
|
|
||||||
if (attributes.isNotice) R.attr.vctr_content_secondary else R.attr.vctr_content_primary
|
|
||||||
))
|
|
||||||
|
|
||||||
if (bindingOptions?.canUseTextFuture.orFalse()) {
|
if (bindingOptions?.canUseTextFuture.orFalse()) {
|
||||||
holder.messageView.setTextFuture(textFuture)
|
holder.messageView.setTextFuture(textFuture)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,76 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
IMPORTANT:
|
|
||||||
Only modify msg_godbubble.xml, then run `generate_bubbles.sh` to update all actually used msg_bubble_*.xml drawables.
|
|
||||||
Note also that most of the comments should not be changed without checking their use in `generate_bubbles.sh`.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
|
|
||||||
<!-- Filled for tail -->
|
|
||||||
<item android:right="@dimen/sc_bubble_tail_size">
|
|
||||||
<shape
|
|
||||||
android:shape="rectangle">
|
|
||||||
|
|
||||||
<solid android:color="?sc_notice_bg_incoming" />
|
|
||||||
|
|
||||||
<corners android:bottomRightRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:bottomLeftRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:topLeftRadius="@dimen/sc_bubble_radius" />
|
|
||||||
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Outer radius -->
|
|
||||||
<item android:right="@dimen/sc_bubble_tail_size">
|
|
||||||
<shape
|
|
||||||
android:shape="rectangle">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<stroke android:color="?sc_message_bg_incoming"
|
|
||||||
android:width="@dimen/sc_bubble_stroke" />
|
|
||||||
|
|
||||||
<corners android:bottomRightRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:bottomLeftRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:topLeftRadius="@dimen/sc_bubble_radius" />
|
|
||||||
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
|
|
||||||
<!-- Inner radius -->
|
|
||||||
<item android:right="@dimen/sc_bubble_tail_size">
|
|
||||||
<shape
|
|
||||||
android:shape="rectangle">
|
|
||||||
|
|
||||||
<stroke android:color="?sc_message_bg_incoming"
|
|
||||||
android:width="@dimen/sc_bubble_stroke" />
|
|
||||||
|
|
||||||
<corners android:bottomRightRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:bottomLeftRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:topLeftRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:topRightRadius="@dimen/sc_bubble_radius_in_tail" />
|
|
||||||
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
<!-- Radius end -->
|
|
||||||
|
|
||||||
<!-- Tail -->
|
|
||||||
<item
|
|
||||||
android:gravity="top|right">
|
|
||||||
<vector
|
|
||||||
android:width="@dimen/sc_bubble_tail_size"
|
|
||||||
android:height="@dimen/sc_bubble_tail_size"
|
|
||||||
android:viewportWidth="10.0"
|
|
||||||
android:viewportHeight="10.0">
|
|
||||||
|
|
||||||
<path
|
|
||||||
android:pathData="M10,0 L0,10 L0,0 Z"
|
|
||||||
android:fillColor="?sc_message_bg_incoming" />
|
|
||||||
<!-- tail end -->
|
|
||||||
</vector>
|
|
||||||
</item>
|
|
||||||
<!-- Tail end -->
|
|
||||||
</layer-list>
|
|
|
@ -1,41 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
IMPORTANT:
|
|
||||||
Only modify msg_godbubble.xml, then run `generate_bubbles.sh` to update all actually used msg_bubble_*.xml drawables.
|
|
||||||
Note also that most of the comments should not be changed without checking their use in `generate_bubbles.sh`.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
|
|
||||||
<!-- Filled for no tail -->
|
|
||||||
<item android:right="@dimen/sc_bubble_tail_size">
|
|
||||||
<shape
|
|
||||||
android:shape="rectangle">
|
|
||||||
|
|
||||||
<solid android:color="?sc_notice_bg_incoming" />
|
|
||||||
|
|
||||||
<corners android:radius="@dimen/sc_bubble_radius" />
|
|
||||||
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
<!-- Filled end -->
|
|
||||||
|
|
||||||
<!-- Inner radius -->
|
|
||||||
<item android:right="@dimen/sc_bubble_tail_size">
|
|
||||||
<shape
|
|
||||||
android:shape="rectangle">
|
|
||||||
|
|
||||||
<stroke android:color="?sc_message_bg_incoming"
|
|
||||||
android:width="@dimen/sc_bubble_stroke" />
|
|
||||||
|
|
||||||
<corners android:bottomRightRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:bottomLeftRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:topLeftRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:topRightRadius="@dimen/sc_bubble_radius" />
|
|
||||||
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
<!-- Radius end -->
|
|
||||||
|
|
||||||
|
|
||||||
</layer-list>
|
|
|
@ -1,76 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
IMPORTANT:
|
|
||||||
Only modify msg_godbubble.xml, then run `generate_bubbles.sh` to update all actually used msg_bubble_*.xml drawables.
|
|
||||||
Note also that most of the comments should not be changed without checking their use in `generate_bubbles.sh`.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
|
|
||||||
<!-- Filled for tail -->
|
|
||||||
<item android:left="@dimen/sc_bubble_tail_size">
|
|
||||||
<shape
|
|
||||||
android:shape="rectangle">
|
|
||||||
|
|
||||||
<solid android:color="?sc_notice_bg_outgoing" />
|
|
||||||
|
|
||||||
<corners android:bottomLeftRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:bottomRightRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:topRightRadius="@dimen/sc_bubble_radius" />
|
|
||||||
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Outer radius -->
|
|
||||||
<item android:left="@dimen/sc_bubble_tail_size">
|
|
||||||
<shape
|
|
||||||
android:shape="rectangle">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<stroke android:color="?sc_message_bg_outgoing"
|
|
||||||
android:width="@dimen/sc_bubble_stroke" />
|
|
||||||
|
|
||||||
<corners android:bottomLeftRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:bottomRightRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:topRightRadius="@dimen/sc_bubble_radius" />
|
|
||||||
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
|
|
||||||
<!-- Inner radius -->
|
|
||||||
<item android:left="@dimen/sc_bubble_tail_size">
|
|
||||||
<shape
|
|
||||||
android:shape="rectangle">
|
|
||||||
|
|
||||||
<stroke android:color="?sc_message_bg_outgoing"
|
|
||||||
android:width="@dimen/sc_bubble_stroke" />
|
|
||||||
|
|
||||||
<corners android:bottomLeftRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:bottomRightRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:topRightRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:topLeftRadius="@dimen/sc_bubble_radius_in_tail" />
|
|
||||||
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
<!-- Radius end -->
|
|
||||||
|
|
||||||
<!-- Tail -->
|
|
||||||
<item
|
|
||||||
android:gravity="top|left">
|
|
||||||
<vector
|
|
||||||
android:width="@dimen/sc_bubble_tail_size"
|
|
||||||
android:height="@dimen/sc_bubble_tail_size"
|
|
||||||
android:viewportWidth="10.0"
|
|
||||||
android:viewportHeight="10.0">
|
|
||||||
<!-- LTR tail -->
|
|
||||||
<path
|
|
||||||
android:pathData="M0,0 L10,10 L10,0 Z"
|
|
||||||
android:fillColor="?sc_message_bg_outgoing" />
|
|
||||||
|
|
||||||
</vector>
|
|
||||||
</item>
|
|
||||||
<!-- Tail end -->
|
|
||||||
</layer-list>
|
|
|
@ -1,41 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
IMPORTANT:
|
|
||||||
Only modify msg_godbubble.xml, then run `generate_bubbles.sh` to update all actually used msg_bubble_*.xml drawables.
|
|
||||||
Note also that most of the comments should not be changed without checking their use in `generate_bubbles.sh`.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
|
|
||||||
<!-- Filled for no tail -->
|
|
||||||
<item android:left="@dimen/sc_bubble_tail_size">
|
|
||||||
<shape
|
|
||||||
android:shape="rectangle">
|
|
||||||
|
|
||||||
<solid android:color="?sc_notice_bg_outgoing" />
|
|
||||||
|
|
||||||
<corners android:radius="@dimen/sc_bubble_radius" />
|
|
||||||
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
<!-- Filled end -->
|
|
||||||
|
|
||||||
<!-- Inner radius -->
|
|
||||||
<item android:left="@dimen/sc_bubble_tail_size">
|
|
||||||
<shape
|
|
||||||
android:shape="rectangle">
|
|
||||||
|
|
||||||
<stroke android:color="?sc_message_bg_outgoing"
|
|
||||||
android:width="@dimen/sc_bubble_stroke" />
|
|
||||||
|
|
||||||
<corners android:bottomLeftRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:bottomRightRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:topRightRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:topLeftRadius="@dimen/sc_bubble_radius" />
|
|
||||||
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
<!-- Radius end -->
|
|
||||||
|
|
||||||
|
|
||||||
</layer-list>
|
|
|
@ -1,76 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
IMPORTANT:
|
|
||||||
Only modify msg_godbubble.xml, then run `generate_bubbles.sh` to update all actually used msg_bubble_*.xml drawables.
|
|
||||||
Note also that most of the comments should not be changed without checking their use in `generate_bubbles.sh`.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
|
|
||||||
<!-- Filled for tail -->
|
|
||||||
<item android:left="@dimen/sc_bubble_tail_size">
|
|
||||||
<shape
|
|
||||||
android:shape="rectangle">
|
|
||||||
|
|
||||||
<solid android:color="?sc_notice_bg_incoming" />
|
|
||||||
|
|
||||||
<corners android:bottomLeftRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:bottomRightRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:topRightRadius="@dimen/sc_bubble_radius" />
|
|
||||||
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Outer radius -->
|
|
||||||
<item android:left="@dimen/sc_bubble_tail_size">
|
|
||||||
<shape
|
|
||||||
android:shape="rectangle">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<stroke android:color="?sc_message_bg_incoming"
|
|
||||||
android:width="@dimen/sc_bubble_stroke" />
|
|
||||||
|
|
||||||
<corners android:bottomLeftRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:bottomRightRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:topRightRadius="@dimen/sc_bubble_radius" />
|
|
||||||
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
|
|
||||||
<!-- Inner radius -->
|
|
||||||
<item android:left="@dimen/sc_bubble_tail_size">
|
|
||||||
<shape
|
|
||||||
android:shape="rectangle">
|
|
||||||
|
|
||||||
<stroke android:color="?sc_message_bg_incoming"
|
|
||||||
android:width="@dimen/sc_bubble_stroke" />
|
|
||||||
|
|
||||||
<corners android:bottomLeftRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:bottomRightRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:topRightRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:topLeftRadius="@dimen/sc_bubble_radius_in_tail" />
|
|
||||||
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
<!-- Radius end -->
|
|
||||||
|
|
||||||
<!-- Tail -->
|
|
||||||
<item
|
|
||||||
android:gravity="top|left">
|
|
||||||
<vector
|
|
||||||
android:width="@dimen/sc_bubble_tail_size"
|
|
||||||
android:height="@dimen/sc_bubble_tail_size"
|
|
||||||
android:viewportWidth="10.0"
|
|
||||||
android:viewportHeight="10.0">
|
|
||||||
<!-- LTR tail -->
|
|
||||||
<path
|
|
||||||
android:pathData="M0,0 L10,10 L10,0 Z"
|
|
||||||
android:fillColor="?sc_message_bg_incoming" />
|
|
||||||
|
|
||||||
</vector>
|
|
||||||
</item>
|
|
||||||
<!-- Tail end -->
|
|
||||||
</layer-list>
|
|
|
@ -1,41 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
IMPORTANT:
|
|
||||||
Only modify msg_godbubble.xml, then run `generate_bubbles.sh` to update all actually used msg_bubble_*.xml drawables.
|
|
||||||
Note also that most of the comments should not be changed without checking their use in `generate_bubbles.sh`.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
|
|
||||||
<!-- Filled for no tail -->
|
|
||||||
<item android:left="@dimen/sc_bubble_tail_size">
|
|
||||||
<shape
|
|
||||||
android:shape="rectangle">
|
|
||||||
|
|
||||||
<solid android:color="?sc_notice_bg_incoming" />
|
|
||||||
|
|
||||||
<corners android:radius="@dimen/sc_bubble_radius" />
|
|
||||||
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
<!-- Filled end -->
|
|
||||||
|
|
||||||
<!-- Inner radius -->
|
|
||||||
<item android:left="@dimen/sc_bubble_tail_size">
|
|
||||||
<shape
|
|
||||||
android:shape="rectangle">
|
|
||||||
|
|
||||||
<stroke android:color="?sc_message_bg_incoming"
|
|
||||||
android:width="@dimen/sc_bubble_stroke" />
|
|
||||||
|
|
||||||
<corners android:bottomLeftRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:bottomRightRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:topRightRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:topLeftRadius="@dimen/sc_bubble_radius" />
|
|
||||||
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
<!-- Radius end -->
|
|
||||||
|
|
||||||
|
|
||||||
</layer-list>
|
|
|
@ -1,76 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
IMPORTANT:
|
|
||||||
Only modify msg_godbubble.xml, then run `generate_bubbles.sh` to update all actually used msg_bubble_*.xml drawables.
|
|
||||||
Note also that most of the comments should not be changed without checking their use in `generate_bubbles.sh`.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
|
|
||||||
<!-- Filled for tail -->
|
|
||||||
<item android:right="@dimen/sc_bubble_tail_size">
|
|
||||||
<shape
|
|
||||||
android:shape="rectangle">
|
|
||||||
|
|
||||||
<solid android:color="?sc_notice_bg_outgoing" />
|
|
||||||
|
|
||||||
<corners android:bottomRightRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:bottomLeftRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:topLeftRadius="@dimen/sc_bubble_radius" />
|
|
||||||
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Outer radius -->
|
|
||||||
<item android:right="@dimen/sc_bubble_tail_size">
|
|
||||||
<shape
|
|
||||||
android:shape="rectangle">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<stroke android:color="?sc_message_bg_outgoing"
|
|
||||||
android:width="@dimen/sc_bubble_stroke" />
|
|
||||||
|
|
||||||
<corners android:bottomRightRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:bottomLeftRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:topLeftRadius="@dimen/sc_bubble_radius" />
|
|
||||||
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
|
|
||||||
<!-- Inner radius -->
|
|
||||||
<item android:right="@dimen/sc_bubble_tail_size">
|
|
||||||
<shape
|
|
||||||
android:shape="rectangle">
|
|
||||||
|
|
||||||
<stroke android:color="?sc_message_bg_outgoing"
|
|
||||||
android:width="@dimen/sc_bubble_stroke" />
|
|
||||||
|
|
||||||
<corners android:bottomRightRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:bottomLeftRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:topLeftRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:topRightRadius="@dimen/sc_bubble_radius_in_tail" />
|
|
||||||
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
<!-- Radius end -->
|
|
||||||
|
|
||||||
<!-- Tail -->
|
|
||||||
<item
|
|
||||||
android:gravity="top|right">
|
|
||||||
<vector
|
|
||||||
android:width="@dimen/sc_bubble_tail_size"
|
|
||||||
android:height="@dimen/sc_bubble_tail_size"
|
|
||||||
android:viewportWidth="10.0"
|
|
||||||
android:viewportHeight="10.0">
|
|
||||||
|
|
||||||
<path
|
|
||||||
android:pathData="M10,0 L0,10 L0,0 Z"
|
|
||||||
android:fillColor="?sc_message_bg_outgoing" />
|
|
||||||
<!-- tail end -->
|
|
||||||
</vector>
|
|
||||||
</item>
|
|
||||||
<!-- Tail end -->
|
|
||||||
</layer-list>
|
|
|
@ -1,41 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!--
|
|
||||||
IMPORTANT:
|
|
||||||
Only modify msg_godbubble.xml, then run `generate_bubbles.sh` to update all actually used msg_bubble_*.xml drawables.
|
|
||||||
Note also that most of the comments should not be changed without checking their use in `generate_bubbles.sh`.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
|
|
||||||
<!-- Filled for no tail -->
|
|
||||||
<item android:right="@dimen/sc_bubble_tail_size">
|
|
||||||
<shape
|
|
||||||
android:shape="rectangle">
|
|
||||||
|
|
||||||
<solid android:color="?sc_notice_bg_outgoing" />
|
|
||||||
|
|
||||||
<corners android:radius="@dimen/sc_bubble_radius" />
|
|
||||||
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
<!-- Filled end -->
|
|
||||||
|
|
||||||
<!-- Inner radius -->
|
|
||||||
<item android:right="@dimen/sc_bubble_tail_size">
|
|
||||||
<shape
|
|
||||||
android:shape="rectangle">
|
|
||||||
|
|
||||||
<stroke android:color="?sc_message_bg_outgoing"
|
|
||||||
android:width="@dimen/sc_bubble_stroke" />
|
|
||||||
|
|
||||||
<corners android:bottomRightRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:bottomLeftRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:topLeftRadius="@dimen/sc_bubble_radius"
|
|
||||||
android:topRightRadius="@dimen/sc_bubble_radius" />
|
|
||||||
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
<!-- Radius end -->
|
|
||||||
|
|
||||||
|
|
||||||
</layer-list>
|
|
|
@ -20,8 +20,8 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="0dp"
|
android:layout_margin="0dp"
|
||||||
|
android:textColor="?vctr_content_primary"
|
||||||
android:layout_gravity="left"
|
android:layout_gravity="left"
|
||||||
tools:textColor="?vctr_content_primary"
|
|
||||||
tools:text="@sample/messages.json/data/message"
|
tools:text="@sample/messages.json/data/message"
|
||||||
tools:ignore="RtlHardcoded" />
|
tools:ignore="RtlHardcoded" />
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue