AndroidTagView icon indicating copy to clipboard operation
AndroidTagView copied to clipboard

How to remove cross icon for specific tag?

Open ArbazIn opened this issue 3 years ago • 0 comments

First of thanks for this wonderful library for tag view.

I don't want a cross icon on my first or specific tag example mention below.

@BindView(R.id.tagVie) TagContainerLayout tagViewAPRes; ArrayList<String> peopleList = new ArrayList<>();

peopleList.add("+Add peoples"); peopleList.add("Abd"); peopleList.add("def"); peopleList.add("hig");

tagVie.setOnTagClickListener(new TagView.OnTagClickListener() { @Override public void onTagClick(int position, String text) { Toast.makeText(MinutesOfMeetingActivity.this, "click-position:" + position + ", text:" + text, Toast.LENGTH_SHORT).show(); }

            @Override
            public void onTagLongClick(final int position, String text) {

            }

            @Override
            public void onSelectedTagDrag(int position, String text) {
            }

            @Override
            public void onTagCrossClick(int position) {
                String strTagName = "";
                strTagName=peopleList.get(position);
                if (momDetailViewsItemArrayList != null && momDetailViewsItemArrayList.isEmpty()) {
                    if (!strTagName.equals("+Add peoples"))){
                        tagViewAPRes.removeTag(position);
                    }
                }
            }
        });`
        

In the above code I prevent that tag from remove but still cross the icon over there, is there any way to remove that icon?

ArbazIn avatar Mar 25 '21 11:03 ArbazIn