FirebaseUI-Android
FirebaseUI-Android copied to clipboard
RecyclerView with Indexed Data
Hi All,
I'm currently using Firebase UI with indexed data in a recycler view. I want to show the latest post from the indexed data first, there for i'm using .setStackFromEnd(true) however when loading the recyclerview, it loads the first set of data from the first key in "setStackFromEnd" order, however I need to swipe the recycler to get the rest of keys data.
If I use .smoothScrollToPosition(mRecycler.getAdapter().getItemCount() -1) in a button this will take me to the last position. However it loads ALL of the data inbetween and the can be very hefty on data.
Has anyone got a solution for the recyclerview to load the very last post of all the indexed data? Or is this a glitch in the system?
Thanks for your help
Classic SO question: https://stackoverflow.com/a/27727398/4548500
@joemerritt see the answer that was pointed out by @SUPERCILEX.
Hi Guys, I'm still struggling with this. I've read the solution posted but it's not answering my issue. When using:
mLayoutManager.setReverseLayout(true);
mLayoutManager.setStackFromEnd(true);
My recycler loads 3-4 post (incorrect order) however does not load at the very last post. Users have to swipe to get to the very last post.
I'm not sure if this is an issue of using indexed data?
Thanks for your time and help