private TransitionListener getTransitionListener() { ViewController controller = ViewController.fromView(active); TransitionListener transitionListener = new NoOpTransitionListener(); if (controller instanceof TransitionListener) { transitionListener = (TransitionListener) controller; } return transitionListener; } }
private TransitionListener getTransitionListener() { ViewController controller = ViewController.fromView(active); TransitionListener transitionListener = new NoOpTransitionListener(); if (controller instanceof TransitionListener) { transitionListener = (TransitionListener) controller; } return transitionListener; } }
private boolean childCanGoBack() { if (active instanceof HandleBack) { return handleBack(active); } ViewController viewController = ViewController.fromView(active); if (viewController != null) { if (viewController instanceof HandleBack) { return handleBack(viewController); } } return false; }
private boolean childCanGoBack() { if (active instanceof HandleBack) { return handleBack(active); } ViewController viewController = ViewController.fromView(active); if (viewController != null) { if (viewController instanceof HandleBack) { return handleBack(viewController); } } return false; }
private void swap(RouteChange routeChange) { final Scoop currentScoop = getActiveScoop(routeChange); final ScreenSwap screenSwap = routeChange.toScreenSwap(); Screen previousScreen = screenSwap.previous; Screen nextScreen = screenSwap.next; final View prevView = active; ViewController nextViewController = null; if (active != null && previousScreen != null) { previousScreen.saveViewState(active); } if (nextScreen == null) { active = null; } else if (nextScreen.getController() != null) { nextViewController = getViewControllerInflater().inflateViewController(currentScoop, nextScreen.getController(), this); active = inflateViewFromController(nextViewController, currentScoop); nextScreen.restoreViewState(active); } else { active = inflateLayout(nextScreen, currentScoop); nextScreen.restoreViewState(active); } isTransitioning = true; ScreenTransition transition; if (screenSwap.direction == TransitionDirection.ENTER) { transition = getTransition(nextViewController, screenSwap.direction); } else { transition = getTransition(ViewController.fromView(prevView), screenSwap.direction); } transition.transition(this, prevView, active, this); }
private TransitionListener getTransitionListener() { ViewController controller = ViewController.fromView(active); TransitionListener transitionListener = new NoOpTransitionListener(); if (controller instanceof TransitionListener) { transitionListener = (TransitionListener) controller; } return transitionListener; } }
private void swap(RouteChange routeChange) { final Scoop currentScoop = getActiveScoop(routeChange); final ScreenSwap screenSwap = routeChange.toScreenSwap(); Screen previousScreen = screenSwap.previous; Screen nextScreen = screenSwap.next; final View prevView = active; ViewController nextViewController = null; if (active != null && previousScreen != null) { previousScreen.saveViewState(active); } if (nextScreen == null) { active = null; } else if (nextScreen.getController() != null) { nextViewController = getViewControllerInflater().inflateViewController(currentScoop, nextScreen.getController(), this); active = inflateViewFromController(nextViewController, currentScoop); nextScreen.restoreViewState(active); } else { active = inflateLayout(nextScreen, currentScoop); nextScreen.restoreViewState(active); } isTransitioning = true; ScreenTransition transition; if (screenSwap.direction == TransitionDirection.ENTER) { transition = getTransition(nextViewController, screenSwap.direction); } else { transition = getTransition(ViewController.fromView(prevView), screenSwap.direction); } transition.transition(this, prevView, active, this); }
private boolean childCanGoBack() { if (active instanceof HandleBack) { return handleBack(active); } ViewController viewController = ViewController.fromView(active); if (viewController != null) { if (viewController instanceof HandleBack) { return handleBack(viewController); } } return false; }
private void swap(RouteChange routeChange) { final Scoop currentScoop = getActiveScoop(routeChange); final ScreenSwap screenSwap = routeChange.toScreenSwap(); Screen previousScreen = screenSwap.previous; Screen nextScreen = screenSwap.next; final View prevView = active; ViewController nextViewController = null; if (active != null && previousScreen != null) { previousScreen.saveViewState(active); } if (nextScreen == null) { active = null; } else if (nextScreen.getController() != null) { nextViewController = getViewControllerInflater().inflateViewController(currentScoop, nextScreen.getController(), this); active = inflateViewFromController(nextViewController, currentScoop); nextScreen.restoreViewState(active); } else { active = inflateLayout(nextScreen, currentScoop); nextScreen.restoreViewState(active); } isTransitioning = true; ScreenTransition transition; if (screenSwap.direction == TransitionDirection.ENTER) { transition = getTransition(nextViewController, screenSwap.direction); } else { transition = getTransition(ViewController.fromView(prevView), screenSwap.direction); } transition.transition(this, prevView, active, this); }