How to decrease sensitivity of onTouch ? I have a custom remote with a virtual touch pad on it. The problem is that when I move finger over the touch pad the mouse cursor moves very fast. So is there a way to decrease that movement speed ?
I have googled the problem and in some articles there is written that it is possible only if the phone is rooted.
public void onTouch(View v, MotionEvent event) {
KeyImageView mKeyImageView= (KeyImageView)v;
int width = mKeyImageView.getWidth();
int height = mKeyImageView.getHeight();
Log.d(TAG,"onTouch:"+width+" "+height+" "+RemoteIME.mService.getWidth()+" "+RemoteIME.mService.getHeigt());
int touch_x = switchTouchXY((int)event.getX(), width, RemoteIME.mService.getWidth());
int touch_y = switchTouchXY((int)event.getY(), height, RemoteIME.mService.getHeigt());
Touch mTouch = new Touch(RemoteIME.mService, event.getAction(), touch_x, touch_y);
sendCmdMessage(SendThread.CMD_SEND_TOUCH, 0, 0, mTouch);
}
public int switchTouchXY(int touch, int source, int target) {
return (touch * target / source);
}