/** Factory method that creates a new instance of TransformGestureDetector */ public static TransformGestureDetector newInstance() { return new TransformGestureDetector(MultiPointerGestureDetector.newInstance()); }
/** Factory method that creates a new instance of TransformGestureDetector */ public static TransformGestureDetector newInstance() { return new TransformGestureDetector(MultiPointerGestureDetector.newInstance()); }
@Before public void setup() { mListener = mock(TransformGestureDetector.Listener.class); mMultiPointerGestureDetector = mock(MultiPointerGestureDetector.class); when(mMultiPointerGestureDetector.getPointerCount()).thenReturn(0); when(mMultiPointerGestureDetector.getStartX()).thenReturn(new float[] {100f, 200f}); when(mMultiPointerGestureDetector.getStartY()).thenReturn(new float[] {500f, 600f}); when(mMultiPointerGestureDetector.getCurrentX()).thenReturn(new float[] {10f, 20f}); when(mMultiPointerGestureDetector.getCurrentY()).thenReturn(new float[] {50f, 40f}); mGestureDetector = new TransformGestureDetector(mMultiPointerGestureDetector); mGestureDetector.setListener(mListener); }