-
Notifications
You must be signed in to change notification settings - Fork 159
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
ReverseLayout not working? #70
Comments
Thats true, reverse layout does not work properly, only stack from end. |
So I looked at this. I couldn't figure out where to place the headers. In the sample app the list goes like this -item 0 And headers stick to top. In reverse order it makes sense to put the header above the items. Also header should stick to top. But with items has no title we would end up something like this: Header 1 So 'item 0' looks like under 'Header 0' but it is not. It seems like it because it doesn't have a title. If we have a use case for reverse layout I can start work on it. |
@oshamahue One use case could be a chat screen in a messaging application, where date separators should be drawn as sticky headers, and the message list must be drawn in reverse order. |
Yeah headers are above the items in the sample app, but item 0 does not have a header (a feature added in #48). But I haven't tried using |
@Nassa I actually have that exact same use case. Can't you just reverse the order of your message list? |
You could do that, but then the very first message will be displayed at the top of the list, and the list will grow down. In most of the popular messaging apps the list grows bottom-up, and it is also (arguably) more intuitive, so I wanted to implement it using reverse layout. Here's my quick-and-dirty implementation, if anyone's interested: Sorry, I don't have time to implement a proper library-worthy solution right now. |
If the list is sorted in ascending date order, the oldest items will be at
the top and any new messages would get added to the end of the list so it
would display bottom up as desired.
…On Fri, Sep 28, 2018, 2:55 AM nassa ***@***.***> wrote:
@Nassa <https://github.com/nassa> I actually have that exact same use
case. Can't you just reverse the order of your message list?
You could do that, but then the very first message will be displayed at
the top of the list, and the list will grow down. In most of the popular
messaging apps the list grows bottom-up, and it is also (arguably) more
intuitive, so I wanted to implement it using reverse layout.
Here's my quick-and-dirty implementation, if anyone's interested:
https://gist.github.com/nassa/6ebf102c77cd46b0861e232a2df9bf2c
Sorry, I don't have time to implement a proper library-worthy solution
right now.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#70 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQkVAIN5SR-DrYJfLmygjTHa3z_Um9wks5ufcfVgaJpZM4MaSxr>
.
|
Yeah my app has that same bottom up layout with headers and I'm not having
the same issue.
…On Fri, Sep 28, 2018, 9:12 AM nassa ***@***.***> wrote:
[image: 201809281911071000]
<https://user-images.githubusercontent.com/4612367/46210357-54aa9480-c352-11e8-9381-250e291663c0.jpg>
Here's what I mean. I want the second layout.
I understand that layout direction has no effect if there are enough
messages to fill the entire screen.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#70 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQkVLbH-RykX5e3g48PCctOLaLZeI96ks5ufiBVgaJpZM4MaSxr>
.
|
I set on my LinearLayout manager
reverseLayout
totrue
and sticky headers are not working.I want to see headers acting same as
reverseLayout
is set tofalse
.Can anybody help with this?
The text was updated successfully, but these errors were encountered: