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

Chat Layout #28

Closed
uaeuae opened this issue Apr 29, 2017 · 8 comments
Closed

Chat Layout #28

uaeuae opened this issue Apr 29, 2017 · 8 comments

Comments

@uaeuae
Copy link

uaeuae commented Apr 29, 2017

Currently when I use the library, the chat appears starts from bottom to top. Could anyone help me in re configuring the chat layout to start from top to bottom like whatsapp?

@mradzinski
Copy link
Contributor

mradzinski commented Apr 30, 2017

How about reversing your messages array? AFAIK the messages layout doesn't apply any kind of sorting to the messages it receives, thus you should be totally able to reverse your messages array to make it look the way you want.

@uaeuae
Copy link
Author

uaeuae commented May 2, 2017

Thank you for your replay mradzinski. I think you understood the question wrong. What I meant, currently, the bubbles starts from down (bottom of the screen). What I want the other way around. I want to bubbles to start from top screen like the below screen as the following screenshot.
chat

@mradzinski
Copy link
Contributor

You are not gonna be able to do it, not without forking your own copy of this repo and changing this line. LinearLayoutManager has the following constructor: LinearLayoutManager(Context context, int orientation, boolean reverseLayout), stfalcon-studio chose to pass true to the reverseLayout parameter and it'll stay true unless you manually modify their code.

@mradzinski
Copy link
Contributor

I made a PR to close this issue. You can check the solution here: #31

@troy379
Copy link
Contributor

troy379 commented May 3, 2017

Thanks for your replies @mradzinski !
Unlike your solution, I've added overloading for setAdapter method in DialogsList and MessagesList, with which you can set reverse mode to false (due to versioning).
Please, update library version to 0.2.1

Best regards, Alexander.

@troy379 troy379 closed this as completed May 3, 2017
@shubhral
Copy link

shubhral commented Jun 12, 2017

I was facing the same issue since yesterday where the dialogs in my dialogList were appearing from bottom. Thanks to this issue raised by @uaeuae , I finally got it working the desired way by overriding default reverse mode to false in setAdapter.
I think it'd be great if you add this in your documentation as well @troy379

Cheers! :)

@CallumCoombes
Copy link

Is there a way to do this that doesn't also reverse the date rows?

@ptrudec
Copy link

ptrudec commented May 2, 2019

@troy379 In adapter reverseLayout = True and when adding messages to list with addToEnd reverse = True. Is there any option when there isn't enough messages to fill the screen that messages doesn't have padding from top?
Screen Shot 2019-05-02 at 11 00 24

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

Successfully merging a pull request may close this issue.

6 participants