FlowLayout is an layout that display its children in multiple rows depending on their size
compile 'me.codego.view:flowlayout:1.0.2'
<dependency>
<groupId>me.codego.view</groupId>
<artifactId>flowlayout</artifactId>
<version>1.0.2</version>
<type>pom</type>
</dependency>
<me.codego.view.FlowLayout
android:id="@+id/flow_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:horizontalSpacing="10dp"
app:verticalSpacing="15dp" />
horizontalSpacing 水平间距
verticalSpacing 垂直间距
for (String tag : tags) {
flowLayout.addView(initTag(tag));
}