FlowLayout is an Android UI library that implements a “flow” or “tag cloud” layout where items automatically wrap onto new lines as needed, making it ideal for chips, product tags, and selectable labels. Instead of manually placing views, you feed data through an adapter-style API, so tags can be created dynamically from a list and refreshed when the dataset changes. The library supports selection behavior out of the box, including single-select and multi-select modes, so it can behave like a group of checkable chips without you building the state machinery from scratch. It also provides click and selection listeners that let you react when a user taps a tag or when the selected set changes, which is useful for filters and preference UIs. To keep the UI consistent, it can preserve selection state across activity recreation such as rotation, reducing edge-case bugs in real apps.
Features
- Flow-style layout that wraps items across lines
- Adapter-based data injection for dynamic tag rendering
- Single-select and multi-select tag modes
- Click and selection change callbacks
- Dataset refresh support via notify-style updates
- Selection state retention across activity recreation