Cutta / TagView

Android TagView-HashTagView
Apache License 2.0
490 stars 93 forks source link

Delete item from inner collection in onDelete #12

Open mtychyna opened 8 years ago

mtychyna commented 8 years ago

After onDelete the item is still in inner collection, and it can break business logic.

                deletableView.setOnClickListener(new OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        if (mDeleteListener != null) {
                            Tag targetTag = tag;
                            mDeleteListener.onTagDeleted(TagView.this, targetTag, position);
                        }
                    }
                });

Need delete from inner mTags!

Cutta commented 8 years ago

It depends on you. The library can remove but maybe you want just disappear the tags so if you want to remove from mTags. you can just initiliaze the tag's list which updated one.