I searching about method which I check which way I touch screen and after that send information to touch event. I want to check if I touch screen one finger or two fingers or I move finger on screen. This is any method to check what I am doing my fingers on the screen befor application do some actions?
Asked
Active
Viewed 276 times
0
-
Have a glance of this link:http://www.androidadb.com/class/android/view/View/OnTouchListener.java.html – AkashG Jul 09 '12 at 08:23
1 Answers
0
I think you can try this one.
A drag gesture starts when the first finger is pressed to the screen (ACTION_DOWN) and ends when it is removed (ACTION_UP or ACTION_POINTER_UP).
switch (event.getAction() & MotionEvent.ACTION_MASK) {
case MotionEvent.ACTION_DOWN:
savedMatrix.set(matrix);
start.set(event.getX(), event.getY());
Log.d(TAG, "mode=DRAG" );
mode = DRAG;
break;
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_POINTER_UP:
mode = NONE;
Log.d(TAG, "mode=NONE" );
break;
case MotionEvent.ACTION_MOVE:
if (mode == DRAG) {
matrix.set(savedMatrix);
matrix.postTranslate(event.getX() - start.x, event.getY() - start.y);
}
break;
}
for complete information check here
(or)
for document check here

Dipak Keshariya
- 22,193
- 18
- 76
- 128

Ram kiran Pachigolla
- 20,897
- 15
- 57
- 78