¾ÛÅøÁî
46.¢½.168.138
46.¢½.168.129
46.¢½.168.161
46.¢½.168.136
46.¢½.168.145
46.¢½.168.162
46.¢½.168.144
46.¢½.168.140
115.¢½.135.198
46.¢½.168.139
 
°Ô½Ã¹° 2°Ç
 
¸ÖƼÅÍÄ¡°ªÀ» ¹Þ¾Æ¿À·Á°í Çϴµ¥..
±Û¾´ÀÌ : À¯ÀçÈ«                   ³¯Â¥ : 2011-05-26 (¸ñ) 16:14 Á¶È¸ : 5011
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);
 }
* ±ÛÀ» µî·ÏÇϽǶ§ ²À ÇÊ¿äÇÑ °æ¿ì°¡ ¾Æ´Ï¸é °³ÀÎÁ¤º¸¸¦ ³²±âÁö ¸¶¼¼¿ä ^^ (¿¬¶ôó,À̸ÞÀÏÁÖ¼Ò,Áֹεî·Ï¹øÈ£ µî)




À¯ÀçÈ« ´ÔÀÇ Q&A ÃÖ½Å±Û [´õº¸±â]


 

°Ô½Ã¹° 2°Ç
¹øÈ£ Á¦¸ñ ±Û¾´ÀÌ ³¯Â¥ Á¶È¸
2  ¿ÜºÎ ¸®¼Ò½º ÀνºÅç... °í¼ö´ÔµéÀÇ µµ¿òÀÌ Àý½ÇÇÕ´Ï´Ù.. +1 À¯ÀçÈ« 06-24 4632
1  ¸ÖƼÅÍÄ¡°ªÀ» ¹Þ¾Æ¿À·Á°í Çϴµ¥.. À¯ÀçÈ« 05-26 5012
 
 
 
Copyright ¨Ï wwwold.androidstudy.co.kr. All rights reserved.