JavaBeginner JavaBeginner - 25 days ago 7
Android Question

How to move a image across the screen on Android

How to move an image across the screen android?

Guys, im creating MoleMash game for My Coursework and I really need help!. I want to try to move a image (the mole) across the screen in different and random coordinates so that it can be touched by the user to get a score. I created the background which I made the image view. I have the mole, Is it another image view? or is it a Image button?

And how do I move this across to different parts of the screen for the user interact?

I would greatly appreciate your help!

Answer

For games development you need to learn how to use canvas and SurfaceView: How can I use the animation framework inside the canvas?

Using onTouch event listener you would compare the touch location with the location of your animated images...