gestures - Android - Detect Path of Complex Drag -
i getting android programming , want make simple game using 2d canvas drawing. have checked out lunar lander example , read on gestures, looks can detect if gesture occurred. looking little more complicated detection on swipe:
i want make simple game user can drag finger through 1 or more objects on screen , want able detect objects went on in path. may start going vertically, horizontally, vertically again, such @ end of contiguous swipe have selected 4 elements.
1) there apis expose functionality of getting full path of swipe this? 2) since drawing on canvas, don't think able access things "onmouseover" items in game. have instead detect if swipe within bounding box of sprites. thinking correctly?
if have overlooked obvious post, apologize. thank in advance!
i decided implement public boolean ontouchevent(motionevent event)
handler in code game. instead of getting full path, check see tile user on each time ontouchevent fires. thought event fired once on first touch, fires long moving along surface of screen, if haven't retouched.
Comments
Post a Comment