본문 바로가기

About Programing/05. Android

onTouchEvent


@Override
	public boolean onTouchEvent(MotionEvent event, MapView mapView)
	{
		// Touch 한 곳의 X 좌표
		double xPoint = (double)event.getX();
		// Touch 한 곳의 Y 좌표
		double yPoint = (double)event.getY();
		// Touch Action 값
		int actionValue = event.getAction();
		
		switch (actionValue)
		{
		// Touch 했을 때
		case MotionEvent.ACTION_DOWN :			
			
			break;
			
		// Touch 땟을 때
		case MotionEvent.ACTION_UP :
			
			break;
			
		// Drag
		case MotionEvent.ACTION_MOVE :
			
			break;		
		}

		return super.onTouchEvent(event, mapView);
	}