@Test public void setRoot_clearsSplashLayout() { disableModalAnimations(child1); FrameLayout content = activity.findViewById(android.R.id.content); assertThat(content.getChildCount()).isEqualTo(4); uut.setRoot(child2, new CommandListenerAdapter()); assertThat(content.getChildCount()).isEqualTo(3); }
public void setRoot(final ViewController viewController, CommandListener commandListener) { destroyRoot(); if (isRootNotCreated()) { removePreviousContentView(); getView(); } root = viewController; rootPresenter.setRoot(root, defaultOptions, commandListener); }
Navigator extends ParentController { public void setRoot(final ViewController viewController, CommandListener commandListener) { destroyRoot(); if (isRootNotCreated()) { removePreviousContentView(); getView(); } root = viewController; rootPresenter.setRoot(root, defaultOptions, commandListener); } }
Navigator extends ParentController { public void setRoot(final ViewController viewController, CommandListener commandListener) { destroyRoot(); if (isRootNotCreated()) { removePreviousContentView(); getView(); } root = viewController; rootPresenter.setRoot(root, defaultOptions, commandListener); } Navigator(final Activity activity, ChildControllersRegistry childRegistry, ModalStack modalStack, OverlayManager overlayManager, RootPresenter rootPresenter); }
Navigator extends ParentController { public void setRoot(final ViewController viewController, CommandListener commandListener) { destroyRoot(); if (isRootNotCreated()) { removePreviousContentView(); getView(); } root = viewController; rootPresenter.setRoot(root, defaultOptions, commandListener); } Navigator(final Activity activity, ChildControllersRegistry childRegistry, ModalStack modalStack, OverlayManager overlayManager, RootPresenter rootPresenter); @Override void setDefaultOptions(Options defaultOptions); Options getDefaultOptions(); FrameLayout getRootLayout(); void setEventEmitter(EventEmitter eventEmitter); void setContentLayout(ViewGroup contentLayout); void bindViews(); @NonNull @Override Collection<ViewController> getChildControllers(); @Override boolean handleBack(CommandListener listener); @Override void destroy(); void destroyViews(); @Override void sendOnNavigationButtonPressed(String buttonId); void setRoot(final ViewController viewController, CommandListener commandListener); void mergeOptions(final String componentId, Options options); void push(final String id, final ViewController viewController, CommandListener listener); void setStackRoot(String id, ViewController viewController, CommandListener listener); void pop(String id, Options mergeOptions, CommandListener listener); void popToRoot(final String id, Options mergeOptions, CommandListener listener); void popTo(final String id, Options mergeOptions, CommandListener listener); void showModal(final ViewController viewController, CommandListener listener); void dismissModal(final String componentId, CommandListener listener); void dismissAllModals(Options mergeOptions, CommandListener listener); void showOverlay(ViewController overlay, CommandListener listener); void dismissOverlay(final String componentId, CommandListener listener); @Nullable @Override ViewController findController(String id); }
Navigator extends ParentController { public void setRoot(final ViewController viewController, CommandListener commandListener) { destroyRoot(); if (isRootNotCreated()) { removePreviousContentView(); getView(); } root = viewController; rootPresenter.setRoot(root, defaultOptions, commandListener); } Navigator(final Activity activity, ChildControllersRegistry childRegistry, ModalStack modalStack, OverlayManager overlayManager, RootPresenter rootPresenter); @Override void setDefaultOptions(Options defaultOptions); Options getDefaultOptions(); FrameLayout getRootLayout(); void setEventEmitter(EventEmitter eventEmitter); void setContentLayout(ViewGroup contentLayout); void bindViews(); @NonNull @Override Collection<ViewController> getChildControllers(); @Override boolean handleBack(CommandListener listener); @Override void destroy(); void destroyViews(); @Override void sendOnNavigationButtonPressed(String buttonId); void setRoot(final ViewController viewController, CommandListener commandListener); void mergeOptions(final String componentId, Options options); void push(final String id, final ViewController viewController, CommandListener listener); void setStackRoot(String id, ViewController viewController, CommandListener listener); void pop(String id, Options mergeOptions, CommandListener listener); void popToRoot(final String id, Options mergeOptions, CommandListener listener); void popTo(final String id, Options mergeOptions, CommandListener listener); void showModal(final ViewController viewController, CommandListener listener); void dismissModal(final String componentId, CommandListener listener); void dismissAllModals(Options mergeOptions, CommandListener listener); void showOverlay(ViewController overlay, CommandListener listener); void dismissOverlay(final String componentId, CommandListener listener); @Nullable @Override ViewController findController(String id);  }