An Android TagView Widget. You can edit the tag's style, and set listener of selecting or deleting tag.

Overview

Android-Cloud-TagView-Plus

###Introduction An Android Cloud Tag Widget. You can edit the tag's style, and set listener of selecting or deleting tag. Used in APP with ten millions of users.

###Screenshot Sample

Sample

used in app with ten millions of users(YY)

enter image description here

###Feature

  • Editable Style of Text, such as Font size and color.
  • Editable Style of Tag, Background/Pressed Color, Radius effect, Custom Background, Delete mode.
  • Listener of tag selecting and deleting.
  • Can be created from XML file or Java code.

###Sample Apk download apk

###Usage used in xml file

<me.kaede.tagview.TagView
            android:id="@+id/tagview"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            app:lineMargin="5dp"
            app:tagMargin="3dp"
            app:textPaddingBottom="3dp"
            app:textPaddingLeft="10dp"
            app:textPaddingRight="10dp"
            app:textPaddingTop="3dp">
</me.kaede.tagview.TagView>

or used by java code

TagView tagview2 = new TagView(this);
tagview2.setLineMargin(20f);//dp
tagview2.setTagMargin(20f);
tagview2.setTextPaddingLeft(20f);
tagview2.setTextPaddingTop(20f);
tagview2.setTextPaddingRight(20f);
tagview2.setTexPaddingBottom(20f);

add a lot of tags

String[] tags = getResources().getStringArray(R.array.continents);
tagView.addTags(tags);

add a tag in details

Tag tag = new Tag("Tag Text");
tag.tagTextColor = Color.parseColor("#FFFFFF");
tag.layoutColor =  Color.parseColor("#DDDDDD");
tag.layoutColorPress = Color.parseColor("#555555");
//or tag.background = this.getResources().getDrawable(R.drawable.custom_bg);
tag.radius = 20f;
tag.tagTextSize = 14f;
tag.layoutBorderSize = 1f;
tag.layoutBorderColor = Color.parseColor("#FFFFFF");
tag.isDeletable = true;
tagView.addTag(tag);

###To-Do List

  • Animation Support
  • Multi Tag Arrange Type (such as Right-To-Left arrange)
  • Improve Performance

###Problem TagView supports to be used as ItemView in ListView/GridView/RecyclerView, but it will remove and re-add its tags very frequently when you are flinging. Therefore the performance of TagView in ItemView maybe not good if you have a lot of ItemViews using TagView. And in this situation it is advised to use SpannableString instead of views. I will add SpannableString version of TagView to improve the performance in ItemView.

###Substitute

##中文 ###简介 Android上的云标签控件,除了能设置标签的样式外,还能监听标签的点击和删除事件。目前已在千万级用户的应用上使用。

###特点

  • 支持设置标签内容的样式,如字体大小、颜色
  • 支持设置标签的颜色(或者自定义布局)、点击效果、圆角效果、是否可删除
  • 能监听标签的点击和删除事件
  • 支持从代码或者XML创建TagView

###待完成

  • 动画效果

###License

Copyright 2015 Kaede Akatsuki

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Comments
  • Immediately redraw tags after adding a new tag

    Immediately redraw tags after adding a new tag

    Actually, the Android Studio version of this library does the drawTags() in addTag(). Without the drawTags(), addTag() only updates internal data while leaves UI unchanged.

    opened by KANGOD 7
  • Making TagView Right To Left

    Making TagView Right To Left

    Hi,Tnx for your great work Kaedea. I'm going to make TagView right to left since in my country Iran the language (Persian) is right to left. I mean I need the tags to be set from right and another tag that will be added later set to left of it. How can I do that? Can you develop the code and add this option to it please?

    opened by doorbash 5
  • Fix bug: TagView with deletableView

    Fix bug: TagView with deletableView

    TagView with deletableView will make a new line too early, since tagWidth is calculated in mistake. In line 228, there should be + offset + (textPaddingRight + offset) instead of + textPaddingLeft + textPaddingRight. Dynamically get PaddingLeft and PaddingRight of deletableView, so you can change it's padding in future without modify this code snippet.

    opened by KANGOD 4
  • Set Text Size

    Set Text Size

    suggest using the dimensions in SP, for example tagView.setTextSize(TypedValue.COMPLEX_UNIT_SP , tag.tagTextSize); instead tagView.setTextSize(Utils.spToPx(getContext(), tag.tagTextSize));

    opened by askarsyzdykov 1
  • Add two new methods

    Add two new methods

    Related to #16 .

    With those new methods, addTag(int position, Tag tag) and replaceTag(int position, Tag tag), It's possible to update a tag style at any time.

    Example of usage:

    myTag.setOnTagClickListener((id, tag) -> {
      boolean selected = selectedTag.id != tag.id;
      int position = getTagPosition(tag);
      updateTagState(tag, selected);
      myTag.replaceTag(position, tag);
    });
    
    opened by adrielcafe 0
  • Disable tag layoutColorPress

    Disable tag layoutColorPress

    Is there a way to disable the layout color press event on a tag?

    The purpose is to not change any thing on the tag layout, when the user clicks it. The tag should remain unchanged.

    opened by xjpmauricio 0
  • 不会自动换行的bug解决方案

    不会自动换行的bug解决方案

    我在使用时,发现,listview加载完之后,tagview不会自动换行,看了一下源码,只需要在tagview下添加以下代码:

    	public void setMaxWith(int width) {
    		mWidth = width;
    	}
    

    并在使用tagview之前,调用此方法,设置一个tagview所占用的最大宽度,例如我的代码中,动态计算出宽度并设置即可:

    int phoneWid = HomepageUtil.getPhoneWid();
    mHolder.tag_describe.setMaxWith(phoneWid - HomepageUtil.dp2px(15 + 100 + 12 + 15));
    
    opened by SherlockGougou 0
  • ListView中的问题

    ListView中的问题

    你好,最近在做标签的功能,使用了你的控件,效果不错,也方便的。在ListView中使用的过程中遇到的问题哈,想请教一下你。 问题描述如下: 在ListView中,我使用了Tagview,在就多Tag的时候,出现了一开始只显示一部分的情况Tag,后面超出的部分Tag处于隐藏状态,通过ListView滑动后才会换行全部显示出来,请问一下这个问题的我哪里设置有问题吗?还是布局的问题?

    opened by jisuz 2
Owner
Kaede Akatsuki
この先にある困難に負けず、頑張ろ!
Kaede Akatsuki
:four_leaf_clover:A beautiful android tag group widget.

AndroidTagGroup The TagGroup is a special layout with a set of tags. You can use it to tag people, books or anything you want. Also you can contribute

Jun Gu 2.5k Jan 2, 2023
A TagView library for Android. Customize your own & Drag effect.

AndroidTagView An Android TagView library. You can customize awesome TagView by using this library. Screenshots Usage Step 1 Add below dependency in y

lujun 1.7k Dec 29, 2022
Android TagView-HashTagView

Android TagView Android TagView-HashTagView Xamarin version, written by @fernandolopes https://github.com/fernandolopes/Xamarin.Android.TagView Simple

Cüneyt Çarıkçi 490 Nov 17, 2022
Simple android view to display list of colorful tags efficiently.

Android TagView Simple android view to display collection of colorful tags efficiently. Library uses TextView as a base, and creates custom Spanes to

Michał Charmas 175 Nov 11, 2022
This is a library designed for highlighting hashtags ("#example") and catching click on them.

HashTagHelper This is a library designed for highlighting hashtags ("#example") and catching click on them. #Usage Add this snippet to your project bu

Danylo Volokh 598 Oct 28, 2022
Tagcloud component for android

TagCloudView English Sample 扫码下载示例APK 简介 TagCloudView是一个基于ViewGroup实现的控件,支持将一组View展示为一个3D球形集合,并支持全方向滚动。 UI效果 Image 使用 Eclipse copy代码,或使用ADT的maven插件 An

moxun 1.6k Dec 20, 2022
An Android TagView Widget. You can edit the tag's style, and set listener of selecting or deleting tag.

Android-Cloud-TagView-Plus ###Introduction An Android Cloud Tag Widget. You can edit the tag's style, and set listener of selecting or deleting tag. U

Kaede Akatsuki 663 Nov 19, 2022
VirtualTag is a name tag edit plugin for minecraft server

VirtualTag VirtualTag is a NameTag Edit plugin for modern minecraft server Support Version 1.17.x Download https://github.com/jiangdashao/VirtualTag/r

RERERE 13 Dec 18, 2022
:four_leaf_clover:A beautiful android tag group widget.

AndroidTagGroup The TagGroup is a special layout with a set of tags. You can use it to tag people, books or anything you want. Also you can contribute

Jun Gu 2.5k Jan 2, 2023
LiteGo is a Java-based asynchronous concurrency library. It has a smart executor, which can be freely set the maximum number of concurrent at same time , and the number of threads in waiting queue. It can also set waiting policies and overload strategies.

LiteGo:「迷你」的Android异步并发类库 LiteGo是一款基于Java语言的「异步并发类库」,它的核心是一枚「迷你」并发器,它可以自由地设置同一时段的最大「并发」数量,等待「排队」线程数量,还可以设置「排队策略」和「超载策略」。 LiteGo可以直接投入Runnable、Callable

马天宇 189 Nov 10, 2022
Android widget for selecting a range of values.

MaterialRangeBar MaterialRangeBar is a fork from https://github.com/edmodo/range-bar that adds some basic material styling, as well as start and end v

null 1.7k Dec 30, 2022
Android widget for selecting a range of values.

MaterialRangeBar MaterialRangeBar is a fork from https://github.com/edmodo/range-bar that adds some basic material styling, as well as start and end v

null 1.7k Dec 30, 2022
Android widget for selecting a range of values.

RangeBar The RangeBar is similar to an enhanced SeekBar widget, though it doesn't make use of the SeekBar. It provides for the selection of a range of

Edmodo 715 Nov 14, 2022
An Android Widget for selecting items that rotate on a wheel.

Looking for maintainers I'm no longer active on this project but I'll still focus on fixing crashing issues and review any code changes etc. WheelView

Luke Deighton 888 Jan 3, 2023
An Android Widget for selecting items that rotate on a wheel.

CursorWheelLayout CursorWheelLayout is an Android library that allows view to be placed on a rotatable wheel. It behaves like a Circular ListView wher

HelloCsl 725 Nov 21, 2022
Set projects versions based on git tags and following semantic versioning

SemVer Gradle Plugin Set projects versions based on git tags and following semantic versioning. Inspired on Reckon but centered on supporting multi-pr

Javier Segovia Córdoba 10 Jan 6, 2023
A dual-function menu button that offers a default action as well as the possibility of choosing a different action by selecting from a set of alternatives.

A dual-function menu button that offers a default action as well as the possibility of choosing a different action by selecting from a set of alternatives.

Kojo Fosu Bempa Edue 114 Nov 29, 2022
Chips EditText, Token EditText, Bubble EditText, Spannable EditText and etc.. There are many names of this control. Here I develop easy to understand , modify and integrate Chips Edit Text widget for Android

Chips EditText Library Chips EditText, Token EditText, Bubble EditText, Spannable EditText and etc.. There are many names of this control. Here I deve

kpbird 381 Nov 20, 2022
SimpleToDo is an android app that allows building a todo list and basic todo items management functionality including adding new items, editing and deleting an existing item.

SimpleToDo is an android app that allows building a todo list and basic todo items management functionality including adding new items, editing and deleting an existing item.

null 0 Jan 3, 2022
Todo List Application is an android app that allows building a todo list and basic todo items management functionality including adding new items, editing and deleting an existing item

Todo List Application is an android app that allows building a todo list and basic todo items management functionality including adding new items, editing and deleting an existing item

null 0 Jan 22, 2022