mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 12:09:45 +01:00
add some margins to the reactions on a message
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
deac2059ff
commit
65e447b6a5
@ -142,7 +142,12 @@ class MagicIncomingTextMessageViewHolder(itemView: View, payload: Any) : Message
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT
|
||||
)
|
||||
params.setMargins(0, 0, EMOJI_RIGHT_MARGIN, 0)
|
||||
params.setMargins(
|
||||
DisplayUtils.convertDpToPixel(EMOJI_START_MARGIN, context).toInt(),
|
||||
0,
|
||||
DisplayUtils.convertDpToPixel(EMOJI_END_MARGIN, context).toInt(),
|
||||
0
|
||||
)
|
||||
reactionAmount.layoutParams = params
|
||||
|
||||
binding.reactionsEmojiWrapper.addView(reactionEmoji)
|
||||
@ -308,6 +313,7 @@ class MagicIncomingTextMessageViewHolder(itemView: View, payload: Any) : Message
|
||||
companion object {
|
||||
const val TEXT_SIZE_MULTIPLIER = 2.5
|
||||
const val MAX_EMOJIS_TO_DISPLAY = 4
|
||||
const val EMOJI_RIGHT_MARGIN: Int = 10
|
||||
const val EMOJI_START_MARGIN: Float = 2F
|
||||
const val EMOJI_END_MARGIN: Float = 8F
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user