Improved gestures: parallel system and samples #253

This commit is contained in:
Emux
2016-11-25 09:28:33 +02:00
parent 71f7c45b21
commit ba93445259
15 changed files with 934 additions and 173 deletions

View File

@@ -18,14 +18,13 @@ import static org.mockito.Mockito.when;
public class MapEventLayerTest {
private MapEventLayer layer;
private Map mockMap;
private ViewController mockViewport;
private Animator mockAnimator;
private ArgumentCaptor<Float> argumentCaptor;
@Before
public void setUp() throws Exception {
mockMap = Mockito.mock(Map.class);
Map mockMap = Mockito.mock(Map.class);
mockViewport = Mockito.mock(ViewController.class);
mockAnimator = Mockito.mock(Animator.class);
layer = new MapEventLayer(mockMap);
@@ -94,12 +93,12 @@ public class MapEventLayerTest {
layer.onTouchEvent(new TestMotionEvent(MotionEvent.ACTION_UP, 1, 2));
}
class TestMotionEvent extends MotionEvent {
private class TestMotionEvent extends MotionEvent {
final int action;
final float x;
final float y;
public TestMotionEvent(int action, float x, float y) {
TestMotionEvent(int action, float x, float y) {
this.action = action;
this.x = x;
this.y = y;