android-tagview icon indicating copy to clipboard operation
android-tagview copied to clipboard

How to change background and text color of a selected tag ?

Open sajib-4414 opened this issue 9 years ago • 3 comments

This library offers all other necessary features but i badly in need of this to change color of a selected tag ,so that user can get visual feedback which tag was selected

sajib-4414 avatar May 23 '16 05:05 sajib-4414

need to add selected-state feature

kaedea avatar Jun 15 '16 07:06 kaedea

Any update on this? I need this too!

kiaanpillay avatar Dec 17 '16 10:12 kiaanpillay

I've made a work around solution for this : in the TagView.java in the library i added this function : public void replaceAtPosition(int position,Tag tag){ LogUtil.v(TAG,"[remove]position = " + position); mTags.remove(position); mTags.add(position,tag); drawTags(); } and i called it from the main class with tagView.setOnTagClickListener(new OnTagClickListener() { @Override public void onTagClick(int position, Tag tag) { Tag newTag= new Tag(); newTag.tagTextColor = Color.parseColor(colorOfElements); newTag.layoutColorPress = Color.parseColor(colorOfElements); newTag.layoutBorderColor = Color.parseColor(colorOfElements); newTag.layoutBorderSize = 1f; tagView.replaceAtPosition(position,tag); }

samernady avatar Feb 06 '17 10:02 samernady