Skip to content

liusilong/LabelSelectorLayout

Repository files navigation

LabelSelectorLayout

标签选择器

使用方法

xml

<com.lsl.labelselectorlayout.view.LabelLayout
        android:id="@+id/labelLayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

Activity

override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        val list = (0..14).map { "Label$it" }
        labelLayout.setList(list)
    }

可以使用 LabelSelectorLayout#getSelectedList()方法来获取选中的标签集合

效果如下

效果链接

LabelSelector.gif

Releases

No releases published

Packages

No packages published

Languages