1
0
Fork 0

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

master
mcarare 2020-04-24 16:03:53 +03:00 committed by Emily Kager
parent 59484208d6
commit 3e13927c25
1 changed files with 7 additions and 0 deletions

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
}
}