Class FlowLayoutManager

  • All Implemented Interfaces:

    
    public class FlowLayoutManager
    extends RecyclerView.LayoutManager
                        

    A RecyclerView.LayoutManager that lays out items in flow style: items are placed in a line until it is full, then a new line starts, like words in a paragraph.

    Items can have different sizes. It supports predictive item animations, scroll and smooth scroll, auto measurement, left, right or center alignment (setAlignment), a limit of items per line (maxItemsPerLine, singleItemPerLine) and a limit of lines (maxLines).

    
    recyclerView.setLayoutManager(new FlowLayoutManager()
            .setAlignment(Alignment.LEFT)
            .maxItemsPerLine(3));