android tag view,HoHo

AndroidTagView是一个Android库,用于创建可定制的标签视图。它提供了多种属性来调整标签的布局、间距、颜色等。通过在build.gradle文件中添加依赖,然后在布局文件中使用TagContainerLayout,并在代码中设置标签,就可以轻松实现标签功能。此外,该库还支持拖动、点击事件、主题和文本方向等高级特性。
摘要由CSDN通过智能技术生成

AndroidTagView

AndroidTagView.svgAndroid%20Arsenal-AndroidTagView-green.svg?style=true

An Android TagView library. You can customize awesome TagView by using this library.

Screenshots

8aa9e1fb13218fb4dc027b618eabcb0a.gif

68d2cf7fa610c949b1e5aec3279f3069.png

Usage

Step 1

Add below dependency in your build.gradle file.

dependencies {

compile 'co.lujun:androidtagview:1.1.4'

}

Step 2

Use the AndroidTagView in layout file, you can add customized attributes here.

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_margin="0dp"

android:padding="10dp"

app:container_enable_drag="false"

app:horizontal_interval="10dp"

app:vertical_interval="10dp"

app:tag_clickable="true"

app:tag_theme="pure_teal" />

Step 3

Use TagView in your code.

TagContainerLayout mTagContainerLayout = (TagContainerLayout) findViewById(R.id.tagcontainerLayout);

mTagContainerLayout.setTags(List tags);

Now, you have successfully created some TagViews. The following will show some more useful features for you customize.

Attributes

name

format

description

vertical_interval

dimension

Vertical interval, default 5(dp)

horizontal_interval

dimension

Horizontal interval, default 5(dp)

container_border_width

dimension

TagContainerLayout border width(default 0.5dp)

container_border_radius

dimension

TagContainerLayout border radius(default 10.0dp)

container_border_color

color

TagContai

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值