Skip to content

How to remove cross icon for specific tag? #119

@ArbazIn

Description

@ArbazIn

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions