title: Draggable popup window
body: <p>I'm trying to create a popup window that you can pull out from the bottom. Like in the youtube android app (see an image below). Do you know how to implement this? Or do you have any examples?</p>
  <p>I tried to do this myself but got stuck at the point where my view gets clipped when I use offset.</p>
  <pre><code>    cardView.setOnTouchListener { v, event -&gt;
          view.offsetTopAndBottom(calucaleOffset(event))
          true
      }
  </code></pre>
  <p>If I set the height of the popup to MATCH_PARENT, I cannot click the buttons on the layouts below.</p>
  <pre><code>    val popupWindow = PopupWindow(view,
          LinearLayout.LayoutParams.MATCH_PARENT,
          LinearLayout.LayoutParams.MATCH_PARENT
      )
  </code></pre>
  <p>I also tried to set off isClippingEnabled and it does not look like the reference.
  I tried to pass click event from popup view to layout below but it looks like the event doesn't fit the layout in terms of coordination. And it feels like a wrong way.</p>
  <p><a href="https://i.stack.imgur.com/2dvWP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2dvWP.png" alt="enter image description here" /></a></p>