Copyright (c) 2014, Xiang Gao
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Re...
If you think the Android project CopresenceDataCollector listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
package wei.mark.standout.ui;
//www.java2s.comimport java.util.Locale;
/**
* This class holds temporal touch and gesture information. Mainly used to hold
* temporary data for onTouchEvent(MotionEvent).
*
* @author Mark Wei <markwei@gmail.com>
*
*/publicclass TouchInfo {
/**
* The state of the window.
*/publicint firstX, firstY, lastX, lastY;
publicdouble dist, scale, firstWidth, firstHeight;
publicfloat ratio;
/**
* Whether we're past the move threshold already.
*/publicboolean moving;
@Override
public String toString() {
return String
.format(Locale.US,
"WindowTouchInfo { firstX=%d, firstY=%d,lastX=%d, lastY=%d, firstWidth=%d, firstHeight=%d }",
firstX, firstY, lastX, lastY, firstWidth, firstHeight);
}
}