hashtag-view
hashtag-view copied to clipboard
Remove all tags (clear all) programmatically
Can I remove all tags programmatically?
hashtagview.removeAll()
I'm using dynamic mode and applying an for each to remove item by item. But the view refresh only once and only the first tagview is removed.
@dsdebastiani did u solve this?
Not exactly @jay-quetzal . I had to insert a new empty data and reapply the transformation to erase the tags.
fun updateData(items: ArrayList<TagObject>) {
hashtagView.setData(items, TAG_TRANSFORM)
}
In my custom View, where the HashtagView is, I wrote a simple function that receives an array and set as new data in the HastagView component. If the array is empty, the tags will be cleared. It's not an ideal solution, but it works.
@dsdebastiani Sorry for late reply, will add new method and update library soon.