@Test public void testShow() throws Exception { magnet.show(); verify(windowManagerMock).addView(iconViewMock, paramsMock); verify(magnet).setPosition(initialX, initialY); }
public void show() { addToWindow(); iconView.setOnClickListener(this); initializeMotionPhysics(); if (initialX != -1 || initialY != -1) { setPosition(initialX, initialY); } else { goToWall(); } xSpring.addListener(this); ySpring.addListener(this); context.registerReceiver(orientationChangeReceiver, new IntentFilter(Intent.ACTION_CONFIGURATION_CHANGED)); }
Magnet implements View.OnTouchListener, View.OnClickListener, ViewTreeObserver.OnGlobalLayoutListener,
    SpringListener { public void show() { addToWindow(); iconView.setOnClickListener(this); initializeMotionPhysics(); if (initialX != -1 || initialY != -1) { setPosition(initialX, initialY); } else { goToWall(); } xSpring.addListener(this); ySpring.addListener(this); context.registerReceiver(orientationChangeReceiver, new IntentFilter(Intent.ACTION_CONFIGURATION_CHANGED)); } }
Magnet implements View.OnTouchListener, View.OnClickListener, ViewTreeObserver.OnGlobalLayoutListener,
    SpringListener { public void show() { addToWindow(); iconView.setOnClickListener(this); initializeMotionPhysics(); if (initialX != -1 || initialY != -1) { setPosition(initialX, initialY); } else { goToWall(); } xSpring.addListener(this); ySpring.addListener(this); context.registerReceiver(orientationChangeReceiver, new IntentFilter(Intent.ACTION_CONFIGURATION_CHANGED)); } Magnet(Context context); }
Magnet implements View.OnTouchListener, View.OnClickListener, ViewTreeObserver.OnGlobalLayoutListener,
    SpringListener { public void show() { addToWindow(); iconView.setOnClickListener(this); initializeMotionPhysics(); if (initialX != -1 || initialY != -1) { setPosition(initialX, initialY); } else { goToWall(); } xSpring.addListener(this); ySpring.addListener(this); context.registerReceiver(orientationChangeReceiver, new IntentFilter(Intent.ACTION_CONFIGURATION_CHANGED)); } Magnet(Context context); static Builder<Magnet> newBuilder(Context context); void show(); @Deprecated void setPosition(int x, int y, boolean animate); void setPosition(int x, int y); void setIconSize(int width, int height); void goToWall(); void destroy(); @Override void onGlobalLayout(); @Override boolean onTouch(View view, MotionEvent event); @Override void onClick(View view); @Override void onSpringUpdate(Spring spring); @Override void onSpringAtRest(Spring spring); @Override void onSpringActivate(Spring spring); @Override void onSpringEndStateChange(Spring spring); }
Magnet implements View.OnTouchListener, View.OnClickListener, ViewTreeObserver.OnGlobalLayoutListener,
    SpringListener { public void show() { addToWindow(); iconView.setOnClickListener(this); initializeMotionPhysics(); if (initialX != -1 || initialY != -1) { setPosition(initialX, initialY); } else { goToWall(); } xSpring.addListener(this); ySpring.addListener(this); context.registerReceiver(orientationChangeReceiver, new IntentFilter(Intent.ACTION_CONFIGURATION_CHANGED)); } Magnet(Context context); static Builder<Magnet> newBuilder(Context context); void show(); @Deprecated void setPosition(int x, int y, boolean animate); void setPosition(int x, int y); void setIconSize(int width, int height); void goToWall(); void destroy(); @Override void onGlobalLayout(); @Override boolean onTouch(View view, MotionEvent event); @Override void onClick(View view); @Override void onSpringUpdate(Spring spring); @Override void onSpringAtRest(Spring spring); @Override void onSpringActivate(Spring spring); @Override void onSpringEndStateChange(Spring spring);  }