title: How to fix: ClickableSpan breaking OnTouchListener in Kotlin
body: <p>I have a simple chat app where the user can touch and hold a message to see the user profile. I am adding a new feature where a user can be tagged so that if the tag is clicked it opens the profile of the tagged person. The new feature makes the old touch and hold functionality break.</p>
  
  <p>The touch and hold is done by overriding the onTouch method of View.OnTouchListener:</p>
  
  <pre><code>    override fun onTouch(v: View?, motionEvent: MotionEvent?): Boolean {
          when (motionEvent?.action) {
              MotionEvent.ACTION_DOWN -&gt; {
                  lastDown = System.currentTimeMillis()
  
                  // Update the background colour
                  v?.context?.let {
                      backgroundView.setBackgroundColor(it.getAttrColor(R.attr.colorBackground))
                  }
                  ChatOptionsDialog.showAfterDelay(backgroundView, mMessage)
              }
  
              MotionEvent.ACTION_CANCEL -&gt; {
                  ChatOptionsDialog.cancelShow()
              }
  
              MotionEvent.ACTION_UP -&gt; {
                  ChatOptionsDialog.cancelShow()
                  ... 
  </code></pre>
  
  <p>The new tagging feature is done with a ClickableSpan which I am setting up by overriding onClick:</p>
  
  <pre><code>           val clickableTerms = sortedMentions.values.map{
                  object : ClickableSpan() {
                      override fun onClick(textView: View) {
                          Profile.startProfileActivity(textView.context, it) 
                      }
                  }
              }
  </code></pre>
  
  <p>The result is that I can click on the tags to open the tagged user profile, but tap and hold doesn't work very well. If I tap and hold anywhere on a message that has a tag, it does nothing. Also if I click to the right of the tag the tag still opens so it seems like that is occupying more space then it should, and tap and hold should work everywhere including over mentions.</p>