开发学院手机开发Android 开发 在Android层实现触摸屏校验 阅读

在Android层实现触摸屏校验

 2010-05-31 14:35:00 来源:WEB开发网   
核心提示:xPrecision, yPrecision, device.id, edgeFlags);} else {if (currentMove != null) {if (false) Log.i("InputDevice", "Adding batch x=" + scaledX+

xPrecision, yPrecision, device.id, edgeFlags);

} else {

if (currentMove != null) {

if (false) Log.i("InputDevice", "Adding batch x=" + scaledX

+ " y=" + scaledY + " to " + currentMove);

currentMove.addBatch(curTime, scaledX, scaledY,

scaledPressure, scaledSize, metaState);

if (WindowManagerPolicy.WATCH_POINTER) {

Log.i("KeyInputQueue", "Updating: " + currentMove);

}

return null;

}

MotionEvent me = MotionEvent.obtain(downTime, curTime,

MotionEvent.ACTION_MOVE, scaledX, scaledY,

scaledPressure, scaledSize, metaState,

xPrecision, yPrecision, device.id, edgeFlags);

currentMove = me;

return me;

}

}

}

static class AbsoluteInfo {

int minValue;

int maxValue;

int range;

int flat;

int fuzz;

};

//once edit

static class TransformInfo {

float x1;

float y1;

float z1;

float x2;

float y2;

float z2;

float s;

};

//edit ends

InputDevice(int _id, int _classes, String _name,

AbsoluteInfo _absX, AbsoluteInfo _absY,

AbsoluteInfo _absPressure, AbsoluteInfo _absSize) {

id = _id;

classes = _classes;

name = _name;

absX = _absX;

absY = _absY;

absPressure = _absPressure;

absSize = _absSize;

//once edit

desFile = new File(CALIBRATION_FILE);

readCalibrate();

//edit ends

}

static void readCalibrate(){

//xxw added

Log.i("XXW","readCalibrate!");

TransformInfo t = null;

try {

FileInputStream is = new FileInputStream(CALIBRATION_FILE);

上一页  1 2 3 4 5 6 7 8 9 10  下一页

Tags:Android 实现 触摸屏

编辑录入:coldstar [复制链接] [打 印]
[]
  • 好
  • 好的评价 如果觉得好,就请您
      0%(0)
  • 差
  • 差的评价 如果觉得差,就请您
      0%(0)
赞助商链接