title: Trying to set an Listener which is abstracted
body: <p>I'm working right now on an little app to test arround with motion and touch events. I am facing the problem that my Listener class has to be abstracted but I cannot create an object from that listener which I would need to put it on the "setOnTouchListener" method of an imageView.</p>
  
  <p>Listener class:</p>
  
  <pre><code>abstract class GestureListener(directionDisplayer: TextView) : View.OnTouchListener,` GestureDetector.OnGestureListener {
  
      private var directionDisplayer: TextView = directionDisplayer
  
      override fun onTouch(v: View?, event: MotionEvent?): Boolean {
          val gestureDetector = GestureDetector(this)
          gestureDetector.onTouchEvent(event)
          return true
      }
  
      override fun onFling(
          downEvent: MotionEvent?,
          moveEvent: MotionEvent?,
          velocityX: Float,
          velocityY: Float
      ): Boolean {
          var result = false
  
          if (downEvent != null &amp;&amp; moveEvent != null) {
              var diffY: Float = moveEvent.y - downEvent.y
              var diffX: Float = moveEvent.x - downEvent.x
  
              val SWIPE_MIN = 100
              val SWIPE_Velocity = 100 //TODO WIDTH
  
              if (Math.abs(diffX) &gt; Math.abs(diffY)) {
                  //RIGHT OR LEFT
                  if (Math.abs(diffX) &gt; SWIPE_MIN &amp;&amp; Math.abs(velocityX) &gt; SWIPE_Velocity) {
                      if (diffX &gt; 0) {
                          swipeRight()
                      } else {
                          swipeLeft()
                      }
                      result = true
                  }
              } else {
                  //UP OR DOWN
                  if(Math.abs(diffY) &gt; SWIPE_MIN &amp;&amp; Math.abs(velocityY) &gt; SWIPE_Velocity) {
                      if(diffY &gt; 0) {
                          swipeUp()
                      } else {
                          swipeDown()
                      }
                      result = true
                  }
  
  
              }
  
          }
          return result
      }
  
      private fun swipeDown() {
          directionDisplayer.text = "Direction: DOWN"
      }
  
      private fun swipeUp() {
          directionDisplayer.text = "Direction: UP"
      }
  
      private fun swipeLeft() {
          directionDisplayer.text = "Direction: LEFT"
      }
  
      private fun swipeRight() {
          directionDisplayer.text = "Direction: RIGHT"
      }
  
  MainActivity (only the important):
  
      class MainActivity : AppCompatActivity() {
  
      override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
          requestWindowFeature(Window.FEATURE_NO_TITLE)
          window.setFlags(
              WindowManager.LayoutParams.FLAG_FULLSCREEN,
              WindowManager.LayoutParams.FLAG_FULLSCREEN
          )
  
          setContentView(R.layout.activity_main)
          val canvasImage: ImageView = findViewById(R.id.canvas)
  
          canvasImage.setOnTouchListener(GestureListener(findViewById(R.id.showDirection)))
  </code></pre>
  
  <p>Does anybody have an idea how to fix this? </p>