ChatKit icon indicating copy to clipboard operation
ChatKit copied to clipboard

Custom OutcomingTextMessageViewHolder displays on left side

Open sbyrnekitman opened this issue 3 years ago • 2 comments

I created a custom OutcomingTextMessageViewHolder so I can change the layout.

Based on the library code it I gathered is using the sender ID to verify whether or not to show the message on the left or right.

isOutcoming = message.getUser().getId().contentEquals(senderId)

isOutcoming is being set to true however the message view is still displayed on the left side. I tried setting the layout's gravity to the end in the xml file but it didn't work.

Can anyone provide some information on whether or not this is a bug or if there is a specific way to set the gravity for custom layouts.

sbyrnekitman avatar Dec 07 '20 14:12 sbyrnekitman

I’m also dealing with the same problem as you are. Did you find any solution?

handesirikci avatar Jan 21 '21 17:01 handesirikci

As a workaround we created a layout that fills the view and then created another one inside it that is bound to the right side. Hope this works for you as well

sbyrnekitman avatar Jan 22 '21 08:01 sbyrnekitman