Android multi-touch. How exactly does it work

p;   }  
      
    private boolean shouldGoRight()  
    {  
        return right.isPressed();  
    }  
      
    private void leftButtonDown(Integer pointerId)  
    {  
        left.setPressed(true);  
        knownPointerMap.put(pointerId, left);  
        doLeft();  
    }  
      
    private void leftButtonUp(Integer pointerId)  
    {  
        left.setPressed(false);  
        knownPointerMap.remove(pointerId);  
        stopLeft();  
    }  
      
    private void rightButtonDown(Integer pointerId)  
    {  
        right.setPressed(true);  
        knownPointerMap.put(pointerId, right);  
        doRight();  
    }  
      
    private void rightButtonUp(Integer pointerId)  
    {  
        right.setPressed(false);  
        knownPointerMap.remove(pointerId);  
        stopRight();  
    }  
          
    private void handleLeftButtonPush(MotionEvent me)  
    {  
        int actionMask = me.getActionMasked();  
        int actionIndex = me.getActionIndex();  
        Integer pointerId = Integer.valueOf(me.getPointerId(actionIndex));  
          
        switch(actionMask):  
        {  
            case ACTION_DOWN:  
            case ACTION_POINTER_DOWN: &nbs

Back  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ... Next  >> 

Copyright © 2007-2012 www.chuibin.com Chuibin Copyright