-
-
Save JonCooperWorks/88551f03adb4c62b01041b131d970b96 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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