ACTION_MOVE À̺¥Æ®¿¡¼
¸ÖƼÅÍÄ¡¸¦ ÇÏÁö¾Ê°í
½Ì±Û ÅÍÄ¡¸¸ Çصµ ¸ÖƼÅÍÄ¡°ªÀÌ ³ª¿À´Â°¡ Çϸé
¸ÖƼÅÍÄ¡¸¦ ÇÏ¿´À»¶§
ACTION_UP °ú ACTION_POINTER_1_UP À̺¥Æ®¿¡¼´Â
µÎ°³´Ù °°Àº°ªÀÌ ¹ÝȯµË´Ï´Ù..
ÄÚµå»ó¿¡ ¹®Á¦°¡ ÀÖ³ª¿ä?
¼Ò½º ÷ºÎÇÕ´Ï´Ù.
------------------------------------------------------------------------------------------
public boolean onTouchEvent(MotionEvent event){
this.m_pointerIndex = event.findPointerIndex(1);
int act = event.getAction();
switch(act & MotionEvent.ACTION_MASK){
case MotionEvent.ACTION_DOWN: //ù¹ø° ¼Õ°¡¶ô ÅÍÄ¡
Log.d("touch began1","x1 = " +(float)event.getX(0));
Log.d("touch began1","x1 = " +(float)event.getY(0));
break;
case MotionEvent.ACTION_MOVE://ÅÍÄ¡ À̵¿
Log.d("touch Move","x2 = " +(float)event.getX(0));
Log.d("touch Move","y2 = " +(float)event.getY(0));
Log.d("touch Move","x2 = " +(float)event.getX(1));
Log.d("touch Move","y2 = " +(float)event.getY(1));
break;
case MotionEvent.ACTION_POINTER_1_DOWN://µÎ¹ø° ¼Õ°¡¶ô ÅÍÄ¡
Log.d("touch began2","x2 = " +(float)event.getX(1));
Log.d("touch began2","x2 = " +(float)event.getY(1));
break;
/* case MotionEvent.ACTION_POINTER_2_DOWN://¼¼¹ø° ¼Õ°¡¶ô ÅÍÄ¡
break;
*/
case MotionEvent.ACTION_POINTER_1_UP:
Log.d("touch ended2","x2 = " +(float)event.getX(1));
Log.d("touch ended2","y2 = " +(float)event.getY(1));
break;
case MotionEvent.ACTION_UP: // ù¹ø° ¼Õ°¡¶ôÀ» ¶¼¾úÀ» °æ¿ì
Log.d("touch ended","x1 = " +(float)event.getX());
Log.d("touch ended","y1 = " +(float)event.getY());
break;
}
return super.onTouchEvent(event);
}
* ±ÛÀ» µî·ÏÇϽǶ§ ²À ÇÊ¿äÇÑ °æ¿ì°¡ ¾Æ´Ï¸é °³ÀÎÁ¤º¸¸¦ ³²±âÁö ¸¶¼¼¿ä ^^ (¿¬¶ôó,À̸ÞÀÏÁÖ¼Ò,Áֹεî·Ï¹øÈ£ µî)