Android Tutorial for Text as TagView

Android Tutorial for Text as TagView

This libirary help to pick up Text as Tag. Like Skill selection or other things what you want. You can call it Tag with EditText You can select specicfic text from showing list or from editText text. Easy to us and Simple library

Sample

ANDROID TUTORIAL FOR TEXT AS TAGVIEW
ANDROID TUTORIAL FOR TEXT AS TAGVIEW

Root Gradle

App Gradle:

Ok Now starts Implementation part. You have to set just follwoing xml Note: No need to add extra Edit text for Tag selection. The xml file will auto provide

And now here we wil discuss how we can use different property

In Activity you can use like:

User can set Tag in two way 1.Typing text and enter Special Character 2.Select item from provided list

So if you want to provide String list you can predefine Tag list by using:

or in XML you can set

To get Tag add or Remove listener

To get selected tag

There are following property that you can use in XML section

AttributesPurpose
app:tag_text_colorTo change Tag text color
app:tag_background_colorTo change Tag Background color
app:tag_limitTo set how many tag will set
app:close_iconTo set remove button of each tag
app:limit_error_textTo set message if tag reach its limit
app:tag_separatorTo set Special Character that entering in EditText will create a tag

How you can set predefine tag list? You can set List of String or array of String

The following methods to change property of tag

Mtehod NamePurpose
addTagLimit(int limit)To set Tag limit
setTagBackgroundColor(int color)To set Tag background color
setTagBackgroundColor(String color)To set Tag background color
setTagTextColor(int color)To set Tag text color
setTagTextColor(String color)To set Tag text color
setMaximumTagLimitMessage(String message)To set Tag limit warning message
setCrossButton(Drawable crossDrawable)To set Tag remove button
setCrossButton(Bitmap crossBitmap)To set Tag remove button
setTagList(List<String> tagList)To set Predefine Tag list
setTagList(String... tagList)To set Predefine Tag list as String array
getSelectedTags()To get all selected TagList

Happy Coding

(Visited 65 times, 1 visits today)

You May Also Like

About the Author: Android Developer

This is Mohammad I am Android Application Developer. I am the founder of Android Tutorial Online blog. I am programming lover and professional blogger from India. I spend most of my time doing programming and helping other programmers. This Android tutorial online blog for learning and share Android code.
My Chatbot
Powered by Replace Me