hashtag-view
hashtag-view copied to clipboard
Double click
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
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.
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