explaingit

hongyangandroid/flowlayout

5,579JavaAudience · developerComplexity · 2/5Setup · moderate

TLDR

An Android UI library for displaying tags or chips that wrap onto new lines as they fill available width, with built-in single-select and multi-select support. No longer maintained.

Mindmap

mindmap
  root((FlowLayout))
    What It Does
      Tag cloud display
      Wrap-on-new-line
      Chip selection
    Tech Stack
      Java
      Android SDK
    Use Cases
      Product filters
      Interest pickers
      Label displays
    Features
      Multi-select
      State drawables
      Adapter pattern
    Status
      Unmaintained
      Version 1.1.2
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add a tag cloud to an Android product page for showing categories or filter chips

USE CASE 2

Build a multi-select interest picker for an Android onboarding or profile screen

USE CASE 3

Display a flowing list of labels on an Android search results screen

USE CASE 4

Show a collection of small labeled elements without writing custom layout logic

Tech stack

JavaAndroid

Getting it running

Difficulty · moderate Time to first run · 30min

Library is unmaintained at version 1.1.2, evaluate forks or alternative libraries before using in a new long-term project.

In plain English

FlowLayout is an Android UI library that provides a tag cloud or flow-based layout for displaying items that wrap onto new lines as they fill horizontal space. It is commonly used for product tags, filter chips, interest labels, or any situation where you want to show a collection of small labeled elements in a flowing arrangement rather than a fixed grid or list. The library works through an adapter pattern similar to what Android developers use for lists: you supply data and a view for each item, and the layout arranges them automatically. Tags can respond to taps, and the component supports single-select, multi-select, or no selection limit, controlled by a single attribute. Selected state is handled through Android state drawables, the same mechanism used by checkboxes, so the visual appearance of selected versus unselected tags can be controlled entirely in an XML layout file without extra code. Other features include callbacks for tap events and selection changes, the ability to pre-select specific items at startup, and support for refreshing the displayed items when the underlying data changes. Selected state is preserved when the screen rotates or the activity is recreated, which is a common pain point for interactive components in Android development. The README is written primarily in Chinese. The project description notes that this library is no longer maintained. The last version available through the standard dependency system is 1.1.2. Developers looking for an actively supported alternative would need to search for a current replacement, as no successor project is mentioned in the README.

Copy-paste prompts

Prompt 1
Show me how to add the FlowLayout library to an Android Gradle project and display a list of selectable tags from a String array with multi-select enabled.
Prompt 2
Write an Android XML layout using FlowLayout to show product filter chips, and Java code that reads which chips are selected when a button is tapped.
Prompt 3
How do I customize the appearance of selected vs unselected tags in FlowLayout using Android state drawables in XML?
Prompt 4
Explain the adapter pattern FlowLayout uses to bind data, and show me how to refresh the displayed tags when the underlying data list changes.
Open on GitHub → Explain another repo

← hongyangandroid on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.