stfalcon-studio/ChatKit

Custom OutcomingTextMessageViewHolder displays on left side

sbyrnekitman opened this issue · 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.

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

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