Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom OutcomingTextMessageViewHolder displays on left side #342

Open
sbyrnekitman opened this issue Dec 7, 2020 · 2 comments
Open

Custom OutcomingTextMessageViewHolder displays on left side #342

sbyrnekitman opened this issue Dec 7, 2020 · 2 comments

Comments

@sbyrnekitman
Copy link

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.

@handesirikci
Copy link

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

@sbyrnekitman
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants