@Test public void onActivityResumed() throws Exception { ScreenListener listener = mock(ScreenListener.class); screenTracker.addListener(listener); Activity activity = mock(Activity.class); screenTracker.onActivityResumed(activity); ArgumentCaptor<Screen> screenCaptor = ArgumentCaptor.forClass(Screen.class); verify(listener).onScreenChanged(screenCaptor.capture()); Screen screen = screenCaptor.getValue(); assertEquals(activity, screen.getActivity()); }
@Override public void onActivityResumed(Activity activity) { currentScreen.setActivity(activity); fireOnScreenChanged(); }
ScreenTracker extends SimpleActivityLifecycleCallbacks implements PhialScopeNotifier.OnScopeChangedListener { @Override public void onActivityResumed(Activity activity) { currentScreen.setActivity(activity); fireOnScreenChanged(); } }
ScreenTracker extends SimpleActivityLifecycleCallbacks implements PhialScopeNotifier.OnScopeChangedListener { @Override public void onActivityResumed(Activity activity) { currentScreen.setActivity(activity); fireOnScreenChanged(); }  }
ScreenTracker extends SimpleActivityLifecycleCallbacks implements PhialScopeNotifier.OnScopeChangedListener { @Override public void onActivityResumed(Activity activity) { currentScreen.setActivity(activity); fireOnScreenChanged(); }  void addListener(ScreenListener listener); void removeListener(ScreenListener listener); Screen getCurrentScreen(); @Override void onActivityResumed(Activity activity); @Override void onActivityPaused(Activity activity); @Override void onEnterScope(String scopeName, View view); @Override void onExitScope(String scopeName); boolean matchesAny(Set<TargetScreen> targetScreen); View findTarget(int id); }
ScreenTracker extends SimpleActivityLifecycleCallbacks implements PhialScopeNotifier.OnScopeChangedListener { @Override public void onActivityResumed(Activity activity) { currentScreen.setActivity(activity); fireOnScreenChanged(); }  void addListener(ScreenListener listener); void removeListener(ScreenListener listener); Screen getCurrentScreen(); @Override void onActivityResumed(Activity activity); @Override void onActivityPaused(Activity activity); @Override void onEnterScope(String scopeName, View view); @Override void onExitScope(String scopeName); boolean matchesAny(Set<TargetScreen> targetScreen); View findTarget(int id);  }