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



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

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 295 times, 1 visits today)