Bouncing ball app at the touch of a listener in android

I refer to this link Bouncing Ball . When the user touches the ball, he stops moving, and when the user releases the ball, he continues to move. How can we do this using a touch gesture?

Thank you at Advance.

+3
source share
1 answer

As I said earlier, this is a lot of declarative answer that will help you here. You need to share your code here to help something.

: onTouchEvent(MotionEvent event). event.getAction(), MotionEvent. MotionEvent.ACTION_DOWN, event.getX() getY() x, y. .

, MotionEvent.ACTION_UP (x, y ) yourObject.setTouched(false). , , .

+3

All Articles