Pass touch event from dialog fragment to View right below (inside the parent activity)

前端 未结 1 1721
隐瞒了意图╮
隐瞒了意图╮ 2021-01-14 21:05

As you can see in the image , red border rectangle is the parent activity . Blue one is dialog fragment . The circle is indicating a view and rectangle below is the

相关标签:
1条回答
  • 2021-01-14 21:43

    If someone is still struggling with this one, this is how is solved it.

    dialog?.window?.decorView?.setOnTouchListener { v, event ->
                activity?.dispatchTouchEvent(event)
                false
            }
    

    this will pass touch event through

    0 讨论(0)
提交回复
热议问题