How to make it so that when you press and hold on the left side of the Bitmap screen (in my case, the rocket) smoothly moved to the left, and when you press on the right to the right?
public boolean onTouchEvent(MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: case MotionEvent.ACTION_MOVE: if(event.getY()>(Game.heightDisplay/2)) { if(coordY > 930) { coordY = 930; } else { coordY= coordY + 5; } } else if(event.getY()<(Game.heightDisplay/2)) { if(coordY < 0) { coordY = 0; } else { coordY= coordY - 5; } } break; case MotionEvent.ACTION_UP: break; } return super.onTouchEvent(event); }