Load more item in recycler-view when reached last item in screen.

Save

The idea here is to find the position of the last visible item. If that position is equal to the last item of your dataset, then you should trigger a reload.

There are several methods to accomplish it. I am using addOnScrollListener() with my Recycler View when we scrolling our screen the Listener is fired. then we find the last item of recycler view with the help of our Layout Manager.

Here is the code for Listener-

Note- If you are load data from the server then take care, recycler view work with own Thread and server Thread do own work without affecting each other. so control loading with the following condition –

 

 

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

css.php

All communication is done through a ticket system. I appreciate the regular almost daily updates of what is being worked on, and communicating changes or updates is easy through this system. Mobikul's response timeframe is quick.

Josh Arnold

Josh Arnold

Owner, Shop ATV Escape

Talk to Sales

Global

Live Chat
Start a Project


    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home