SpritzerTextView icon indicating copy to clipboard operation
SpritzerTextView copied to clipboard

clickcontrols enabled but no setOnClickControlListener

Open moyvera opened this issue 10 years ago • 1 comments

I am trying to implement OnClickControlListener. I have read I need to enable clickcontrols, I have done it with setUseClickControls(true) but listener does not work.

what am I doing wrong bro?

moyvera avatar Jul 28 '14 03:07 moyvera

This is probably a bug, right now setting setUserClickControls sets a bool value but that value is only used in the initialization of the view. However, if you are setting your click controls using xml, i.e

<com.andrewgiang.textspritzer.lib.SpritzerTextView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:typeface="monospace"
    app:clickControls="true"/>

this should work and then you can set your custom click controls using the setOnClickControlListener method.

andrewgiang avatar Aug 01 '14 03:08 andrewgiang