Bubble style none = else

Change-Id: I910075b871f55968685f109ac3f729e42be1b384
This commit is contained in:
SpiritCroc 2020-11-29 15:51:04 +01:00
parent de8bd1d605
commit 6d1cb06373
1 changed files with 12 additions and 11 deletions

View File

@ -322,17 +322,6 @@ abstract class AbsMessageItem<H : AbsMessageItem.Holder> : AbsBaseMessageItem<H>
val contentInBubble = infoInBubbles(holder.memberNameView.context) val contentInBubble = infoInBubbles(holder.memberNameView.context)
when (bubbleStyle) { when (bubbleStyle) {
BubbleThemeUtils.BUBBLE_STYLE_NONE -> {
bubbleView.background = null
(bubbleView.layoutParams as ViewGroup.MarginLayoutParams).marginStart = 0
(bubbleView.layoutParams as ViewGroup.MarginLayoutParams).marginEnd = 0
/*
(bubbleView.layoutParams as RelativeLayout.LayoutParams).marginStart = 0
(bubbleView.layoutParams as RelativeLayout.LayoutParams).topMargin = 0
(bubbleView.layoutParams as RelativeLayout.LayoutParams).bottomMargin = 0
*/
bubbleView.setPadding(0, 0, 0, 0)
}
BubbleThemeUtils.BUBBLE_STYLE_START, BubbleThemeUtils.BUBBLE_STYLE_START,
BubbleThemeUtils.BUBBLE_STYLE_BOTH, BubbleThemeUtils.BUBBLE_STYLE_BOTH,
BubbleThemeUtils.BUBBLE_STYLE_BOTH_HIDDEN, BubbleThemeUtils.BUBBLE_STYLE_BOTH_HIDDEN,
@ -451,6 +440,18 @@ abstract class AbsMessageItem<H : AbsMessageItem.Holder> : AbsBaseMessageItem<H>
} }
} }
} }
//BubbleThemeUtils.BUBBLE_STYLE_NONE,
else -> {
bubbleView.background = null
(bubbleView.layoutParams as ViewGroup.MarginLayoutParams).marginStart = 0
(bubbleView.layoutParams as ViewGroup.MarginLayoutParams).marginEnd = 0
/*
(bubbleView.layoutParams as RelativeLayout.LayoutParams).marginStart = 0
(bubbleView.layoutParams as RelativeLayout.LayoutParams).topMargin = 0
(bubbleView.layoutParams as RelativeLayout.LayoutParams).bottomMargin = 0
*/
bubbleView.setPadding(0, 0, 0, 0)
}
} }
val defaultDirection = holder.eventBaseView.resources.configuration.layoutDirection; val defaultDirection = holder.eventBaseView.resources.configuration.layoutDirection;