1

I have a joystick that have an x and y coordinates and I want to move the Imageview to the position of the x and y coordinates but retaining its position and not going back to 0,0 again.I have already tried setting the x and y coordinates of the imageview by getting the coordinates of the joystick but the joystick is going back to 0,0 everytime I untouch the screen.

if(arg1.getAction() == MotionEvent.ACTION_DOWN
                        || move.getAction() == MotionEvent.ACTION_MOVE) {

                    attackImage.setX(arg1.getX());
                    attackImage.setY(arg1.getY());}
OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
0xDEADBEEF
  • 590
  • 1
  • 5
  • 16

0 Answers0