fix message bubble corner for RTL languages (#2410)

This commit is contained in:
Asiel Díaz Benítez
2022-10-30 11:18:19 -04:00
committed by GitHub
parent 443ea0cd36
commit 856b2d3cdf
3 changed files with 33 additions and 1 deletions
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:top="2px"
android:bottom="2px">
<shape android:shape="rectangle">
<corners
android:topLeftRadius="@dimen/message_corner_radius"
android:topRightRadius="@dimen/message_corner_radius"
android:bottomLeftRadius="@dimen/message_corner_radius" />
<!-- read issue: https://github.com/deltachat/deltachat-android/issues/480 before introducing an attr here. -->
<solid android:color="@color/white" />
</shape>
</item>
</layer-list>
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:top="2px"
android:bottom="2px">
<shape android:shape="rectangle">
<corners
android:topLeftRadius="@dimen/message_corner_radius"
android:topRightRadius="@dimen/message_corner_radius"
android:bottomRightRadius="@dimen/message_corner_radius" />
<!-- read issue: https://github.com/deltachat/deltachat-android/issues/480 before introducing an attr here. -->
<solid android:color="@color/white" />
</shape>
</item>
</layer-list>
@@ -569,7 +569,7 @@ public class ConversationItem extends BaseConversationItem
}
if(bottomLeft != 0 && bottomRight !=0) {
if(current.isOutgoing()) {
if((current.isOutgoing() && ViewUtil.isLtr(this)) || (!current.isOutgoing() && ViewUtil.isRtl(this))) {
bottomRight = 0;
}
else {