Simple android view to display list of colorful tags efficiently.

Overview

Android TagView

Simple android view to display collection of colorful tags efficiently.

Library uses TextView as a base, and creates custom Spanes to achieve such effect. It is usable as static view in the layout, as well in the list element without significant negative effect on it's performance.

Example usages can be found in example project.

Screenshots

Screenshot

Usage

Basic usage

Add view to your layout. You can manipulate content with setTags method.

TagView tv = (TagView) getView().findViewById(R.id.tags_view);
TagView.Tag[] tags = {
    new TagView.Tag("Sample tag", Color.parseColor("#0099CC")),
    new TagView.Tag("Another one", Color.parseColor("#9933CC"))
};
tv.setTags(tags, " ");

To use default style of TagView, include this attribute in your theme:

<item name="tagViewStyle">@style/Widget.TagView</item>

Customization

TagView is derived from TextView, so all it's attributes should work. Most important ones are textSize, textStyle and textColor. Additional view properties are:

  • tagCornerRadius - making corner round
  • tagPadding - adding padding around the tag
  • tagUppercase - making every tag uppercase.

You can inherit sane default values using style @style/Widget.TagView as a parent.

Licence

Copyright 2013 Michał Charmas

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.
You might also like...
A progress bar with animation, gradient and colorful shadow.
A progress bar with animation, gradient and colorful shadow.

Fancy Progressbar Android library providing a beautiful progressbar with colorful shadow, gradient and animation for Jetpack Compose. Download Add in

LiteOrm is a fast, small, powerful ORM framework for Android. LiteOrm makes you do CRUD operarions on SQLite database with a sigle line of code efficiently.

#LiteOrm:Android高性能数据库框架 A fast, small, powerful ORM framework for Android. LiteOrm makes you do CRUD operarions on SQLite database with a sigle line

LiteOrm is a fast, small, powerful ORM framework for Android. LiteOrm makes you do CRUD operarions on SQLite database with a sigle line of code efficiently.

#LiteOrm:Android高性能数据库框架 A fast, small, powerful ORM framework for Android. LiteOrm makes you do CRUD operarions on SQLite database with a sigle line

A learning project which focuses on designing an OTP flow and use of various components of Android efficiently
A learning project which focuses on designing an OTP flow and use of various components of Android efficiently

Otp Demo A learning project which focuses on designing an OTP flow using Firebase. Article: https://saurabhpant.medium.com/otp-login-using-firebase-hi

Connect is an Android Application to connect people for a project and can then work on the application to efficiently complete the project
Connect is an Android Application to connect people for a project and can then work on the application to efficiently complete the project

Connect is an Android Application to connect people for a project and can then work on the application to efficiently complete the project

A Candid language plugin that provide a complete support to efficiently edit .did files.

IntelliJ Candid Language Plugin A Candid language plugin that provide a complete support to efficiently edit .did files. Candid is an interface descri

Android Week View is an android library to display calendars (week view or day view) within the app. It supports custom styling.
Android Week View is an android library to display calendars (week view or day view) within the app. It supports custom styling.

Android Week View Android Week View is an android library to display calendars (week view or day view) within the app. It supports custom styling. Fea

Android Week View is an android library to display calendars (week view or day view) within the app. It supports custom styling.
Android Week View is an android library to display calendars (week view or day view) within the app. It supports custom styling.

Android Week View Android Week View is an android library to display calendars (week view or day view) within the app. It supports custom styling. Fea

Display list of item from local Json and download, view after downloading
Display list of item from local Json and download, view after downloading

Download App Features: ● Display fake responses for the list of videos and books ● choose one or multiple files to download, ● show the download perce

📲Android library to parse open graph tags (ogTags) from given URL.
📲Android library to parse open graph tags (ogTags) from given URL.

ogTagParser Android library to parse open graph tags (ogTags) from given URL. Getting Started Step 1. Add the dependency Root Level Build.gradle file

Flutter NFC Project - A new flutter plugin to help developers looking to use internal hardware inside iOS or Android devices for reading and writing NFC tags
An Android App meant to use NFC technology to communicate with and emulate RFID tags

An Android App meant to use NFC technology to communicate with and emulate RFID tags. Built by Niklaas Cotta & Jordan Whiteley, for CIS 433 WI22.

Gradle plugin to use git tags as project version names

Version Name Gradle Plugin This plugin adds a kotlin extension function that provides a version name based on the latest git tag. How to use it 👣 App

An app which displays questions from Stack Exchange from it's api. Can search questions with tags as well. Uses MVVM architecture, dependency injection, coroutines, retrofit2 for network calls

Stack Exchange app What the app does? Shows a list of trending questions from stack exchange api Can search for the desires question. Can add tags to

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

Gitversion - A native console application to calculate a version based on git commits and tags

GitCommit A native console application to calculate a version based on git commi

DailyTags - a flexible markdown library that supports custom tags and markups
DailyTags - a flexible markdown library that supports custom tags and markups

The library parses a given markup into rich text for Jetpack Compose. DailyTags comes with Markdown and HTML support by default (please, see the supported features) and is very easy to extend to support custom markups.

📌 replaces mutable tags or branch names by commit shas in your GitHub actions

📌 pin-github-actions Using a branch name or tag name as a version for a GitHub action is dangerous as neither branches nor tags are immutable. (See G

Simple android application that consumes RAWG API to display a list of games
Simple android application that consumes RAWG API to display a list of games

Gamex Compose -Work in Progress- An android application that consumes RAWG API to display a list of popular video games built using Jetpack Compose an

Comments
  • Visibility issues

    Visibility issues

    Change code to this in order to handle resetting tags after view was initialized but setTags originally contained an empty list

    public void setTags(List<? extends Tag> tags, String separator) {
        if (tags.isEmpty()) {
            this.setVisibility(View.GONE);
            return;
        } else {
    

    //If you initialized this originally with an empty list the above code made it GONE //then if you try to set again it doesn't become visible without adding this snippet. this.setVisibility(View.VISIBLE); }

    opened by SwiftKayAndroid 1
  • Tags disappear when the orientation of the activity is changed

    Tags disappear when the orientation of the activity is changed

    When changing from portrait to landscape mode and come back, all tags disappear and you can start all over again.

    Also, when tags don't fit in the screen width, the first tag on the next line overlaps a bit with the tag above (after adding more tags it fixes itself, though). So, it only happens with the first tag of each line.

    opened by loolooii 2
  • Onclick for each tag

    Onclick for each tag

    Hi, Thanks for library, its really helping, i am facing small problem, can you please help me out. How to read tags separately on Onclick of each tag.

    opened by Ganganaidu 1
Owner
Michał Charmas
Michał Charmas
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
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
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
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
ScrollableList - learn how to efficiently display a list of text in a RecyclerView and understand its architecture.

ScrollableList Learn how to efficiently display a list of text in a RecyclerView and understand its architecture. activity_main RecyclerView widget he

null 0 Jan 3, 2022
Navigation tab bar with colorful interactions.

NavigationTabBar Navigation tab bar with colorful interactions. You can check the sample app here. Warn This library is not more supported. If you wa

Devlight 4.9k Dec 31, 2022
A colorful SeekBar for picking color

ScreenShot: Attrs attr format default colorSeeds references colorBarPosition integer 0 alphaBarPosition integer 0 maxPosition integer 100 bgColor colo

Jack Fu 324 Dec 26, 2022
A smart colored time selector. Users can select just free time with a handy colorful range selector.

Colored Time Range Selector A smart colored time range selector. Users can select just free time with a handy colorful range selector. Screen Shots Fe

Ehsan Mehranvari 154 Oct 3, 2022
Colorful Sliders written with Jetpack Compose that enliven default sliders

???? ?? Colorful Sliders written with Jetpack Compose that enliven default sliders with track and thumb dimensions, and gradient colors, borders, labels on top or at the bottom move with thumb and ColorfulIconSlider that can display emoji or any Composable as thumb

Smart Tool Factory 70 Dec 30, 2022