Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to remove cross icon for specific tag? #119

Open
ArbazIn opened this issue Mar 25, 2021 · 0 comments
Open

How to remove cross icon for specific tag? #119

ArbazIn opened this issue Mar 25, 2021 · 0 comments

Comments

@ArbazIn
Copy link

ArbazIn commented Mar 25, 2021

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant