greedo-layout-for-android
greedo-layout-for-android copied to clipboard
Find last visible item postion?
I see you have findFirstVisibleItemPosition()
for now. Is there any plan for findLastVisibleItemPosition
?
Hello @eneim! :)
See https://github.com/500px/greedo-layout-for-android/issues/4
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.
Hey @eneim, findLastVisibleItemPosition()
was added in #14. Let me know if it is working for you.
Good news. Thanks. I'll try it right-away.
@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.
@eshkoliGilad Me too, have you resolve your problem? Hope your help, thank you.