greenfrvr / hashtag-view

Android fully customizable widget for representing data like hashtags collection and similiar.
MIT License
337 stars 54 forks source link

Double click #36

Open AAlier opened 6 years ago

AAlier commented 6 years ago

public void addOnTagClickListener(TagsClickListener listener) { if (clickListeners == null) { clickListeners = new ArrayList<>(); } clickListeners.clear(); clickListeners.add(listener); } Suggest you to add clickListeners.clear(); because without it it gets clicked several times although I have added tag click listener once

greenfrvr commented 6 years ago

The idea behind that is you may add several different listeners which does different work. If you created one listener and it was triggered twice, then you added it twice somewhere.

P.S. I will probably consider idea about how to prevent adding the same listener several times.

shaheenzahedi commented 5 years ago

public void addOnTagClickListener(TagsClickListener listener) { if (clickListeners == null) { clickListeners = new ArrayList<>(); } clickListeners.clear(); clickListeners.add(listener); } Suggest you to add clickListeners.clear(); because without it it gets clicked several times although I have added tag click listener once

That is my problem too, it's a little bit weird