Greetings In the libgdx table I do the paging of photos from the server. Implemented loading from top to bottom, but I want to optimize and load only the part of the lines that is visible on the screen in the user's scroll. Can I somehow get this range using libgdx or do I need to invent something?

    2 answers 2

    Thanks for the option, it was possible to solve easier on the client. I calculate the scroll offset in eventListener

    scrollY = scrollpane.getVisualScrollY() 

    I calculate the actors that fall into the scroll area and send a request to the server to swap them.

      I do not know about the ready-made solution for LIBGDX. But, but you can manually organize it.

      For example, to get the height of the visible area for the output lines, divided by the height of the line - we get the number of lines that fit in the visible area.

      Well, and then send a request to the server with the parameter per_page , which will indicate the number of photos to upload. Accordingly, on the server side, consider the per_page parameter.