Created
November 11, 2017 11:18
-
-
Save Krishan14sharma/11d257e6d7c1ae79f763b7018b3b6af5 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
MotionEvent.ACTION_UP -> { | |
touching = false | |
invalidate(squares[rectIndex.first][rectIndex.second]) | |
val (finalX1, finalY1) = getRectIndexesFor(x, y) | |
if ((finalX1 == rectIndex.first) && (finalY1 == rectIndex.second)) { // if initial touch and final touch is in same rectangle or not | |
squarePressListener?.onSquarePressed(rectIndex.first, rectIndex.second) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment