/** * Navigate to the location represented by the controller. Navigation only takes effect when the * given locationId is different from the current location and raises {@link NavigationManager.Event.OnLocationForward} * <p/> * <p> * To set argument for the next location navigating to, use {@link #with(Class, Annotation, Preparer)} * to prepare the controller injecting into the next fragment. * </p> * * @param controllerClass The controller of which screen the app is navigating to. */ public void to(@NotNull Class<? extends Controller> controllerClass) { doNavigateTo(controllerClass, null); go(); }
/** * Navigate to the location represented by the controller. Navigation only takes effect when the * given locationId is different from the current location and raises {@link NavigationManager.Event.OnLocationForward} * <p/> * <p> * To set argument for the next location navigating to, use {@link #with(Class, Annotation, Preparer)} * to prepare the controller injecting into the next fragment. * </p> * * @param controllerClass The controller class type. * @param forwarder The configuration by {@link Forwarder} of the forward navigation. */ public void to(@NotNull Class<? extends Controller> controllerClass, @NotNull Forwarder forwarder) { doNavigateTo(controllerClass, forwarder); go(); }
navigateEvent = new NavigationManager.Event.OnLocationBack(sender, previousLoc, currentLoc, true, this); go();
navigationManager.getModel().setCurrentLocation(previousLoc); navigateEvent = new NavigationManager.Event.OnLocationBack(sender, currentLoc, previousLoc, false, this); go();