title: PopupWindow wrong Y position
body: <p>I want to display the popup in the position where the user clicked on the screen, I use the function - <code>showAtLocation (mainView, Gravity.TOP or Gravity.START, posX, posY)</code>, everything is fine in the x coordinate, but the Y coordinate of the popup is added higher than that place where the user clicked, and if the main view (mainView) is scrolled, then the popup generally flies to the very bottom and I just can't figure out what's wrong with the Y position.
  posX and posY is the position where user touch the screen</p>
  <p><strong>UPDATED</strong></p>
  <pre><code>override fun dispatchTouchEvent(event: MotionEvent): Boolean {    
      posY = event.y.toInt()
      return super.dispatchTouchEvent(event)
  }
  </code></pre>