效果图镇楼
首先我们先添加依赖
compile 'com.zhy:flowlayout-lib:1.0.3'
然后将以下标签和布局添加到项目中。
主布局layouy->activity_flow_layout.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:zhy="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_flow_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="wswy.mymob.FlowLayout">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="完善属性信息,获取更高贷款额度"
/>
<com.zhy.view.flowlayout.TagFlowLayout
android:id="@+id/id_flowlayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="20dp"
zhy:max_select="-1"
>
</com.zhy.view.flowlayout.TagFlowLayout>
</