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

Find last visible item postion? #12

Open
eneim opened this issue Mar 11, 2016 · 6 comments
Open

Find last visible item postion? #12

eneim opened this issue Mar 11, 2016 · 6 comments

Comments

@eneim
Copy link

eneim commented Mar 11, 2016

I see you have findFirstVisibleItemPosition() for now. Is there any plan for findLastVisibleItemPosition ?

@beltex beltex changed the title find last visible item postion? Find last visible item postion? Mar 11, 2016
@beltex
Copy link
Contributor

beltex commented Mar 11, 2016

Hello @eneim! :)

See #4

@eneim
Copy link
Author

eneim commented Mar 16, 2016

Hi thanks for mentioning.

As for comment on that issue, I suppose (for Example) current LinearLayoutManager#findLastVisibleItemPosition() doesn't need to know your items ahead of time. I just tell you the last laid out item's adapter position. Therefore, it could be known after your each layout call. Simply saying, after you finish laid out all the item, this method return the adapter position of the last item which is visible on screen at that moment. Hope this make sense.

@JVillella
Copy link
Contributor

Hey @eneim, findLastVisibleItemPosition() was added in #14. Let me know if it is working for you.

@eneim
Copy link
Author

eneim commented Mar 29, 2016

Good news. Thanks. I'll try it right-away.

@eshkoliGilad
Copy link

@JVillella

It doesn't work on my end.

It returns the last position in the list's data store, even if it is not visible.
Always return the last item in the list.

@kibozh
Copy link

kibozh commented Jul 18, 2018

@eshkoliGilad Me too, have you resolve your problem? Hope your help, thank you.

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

No branches or pull requests

5 participants