For #10180: Add extension to remove touch delegate from parent.

This commit is contained in:
mcarare 2020-04-24 16:03:53 +03:00 committed by Emily Kager
parent 59484208d6
commit 3e13927c25

View File

@ -22,3 +22,10 @@ fun View.increaseTapArea(extraDps: Int) {
parent.touchDelegate = TouchDelegate(touchRect, this)
}
}
fun View.removeTouchDelegate() {
val parent = this.parent as View
parent.post {
parent.touchDelegate = null
}
}