override fun onTouch(v: View, event: MotionEvent): Boolean { | |
val x = event.x | |
val y = event.y | |
Log.d(TAG, "Touch coordinates: ($x, $y)") | |
// Android returns (0, 0) for all touches outside of our overlay. | |
// Since all overlays share this OnTouchListener, this condition will only be true when the | |
// user has clicked on the hole left for the clickjacked UI control. | |
if (x == 0.0F && y == 0.0F) { | |
onUserClickedOutsideOverlay() | |
} | |
return false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment