public enum EnumCommands { PRESS_MOUSE(-1), RELEASE_MOUSE(-2), PRESS_KEY(-3), RELEASE_KEY(-4), MOVE_MOUSE(-5); private int abbrev; EnumCommands(int abbrev){ this.abbrev = abbrev; } public int getAbbrev(){ return abbrev; } }
MotionEvent.ACTION_DOWN
MotionEvent.ACTION_MOVE
case MotionEvent.ACTION_MOVE: int x_cord = (int) event.getRawX(); int y_cord = (int) event.getRawY(); if (x_cord > windowwidth) { x_cord = windowwidth; } if (y_cord > windowheight) { y_cord = windowheight; } layoutParams.leftMargin = x_cord - 25; layoutParams.topMargin = y_cord - 75; IV.setLayoutParams(layoutParams); break;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)