use of com.bluelinelabs.conductor.changehandler.HorizontalChangeHandler in project Conductor by bluelinelabs.
the class RxLifecycle2Controller method onNextWithReleaseClicked.
@OnClick(R.id.btn_next_release_view)
void onNextWithReleaseClicked() {
setRetainViewMode(RetainViewMode.RELEASE_DETACH);
getRouter().pushController(RouterTransaction.with(new TextController("Logcat should now report that the observables from onAttach() and onViewBound() have been disposed of, while the constructor observable is still running.")).pushChangeHandler(new HorizontalChangeHandler()).popChangeHandler(new HorizontalChangeHandler()));
}
use of com.bluelinelabs.conductor.changehandler.HorizontalChangeHandler in project Conductor by bluelinelabs.
the class RxLifecycle2Controller method onNextWithRetainClicked.
@OnClick(R.id.btn_next_retain_view)
void onNextWithRetainClicked() {
setRetainViewMode(RetainViewMode.RETAIN_DETACH);
getRouter().pushController(RouterTransaction.with(new TextController("Logcat should now report that the observables from onAttach() has been disposed of, while the constructor and onViewBound() observables are still running.")).pushChangeHandler(new HorizontalChangeHandler()).popChangeHandler(new HorizontalChangeHandler()));
}
use of com.bluelinelabs.conductor.changehandler.HorizontalChangeHandler in project Conductor by bluelinelabs.
the class RxLifecycleController method onNextWithRetainClicked.
@OnClick(R.id.btn_next_retain_view)
void onNextWithRetainClicked() {
setRetainViewMode(RetainViewMode.RETAIN_DETACH);
getRouter().pushController(RouterTransaction.with(new TextController("Logcat should now report that the observables from onAttach() has been unsubscribed from, while the constructor and onViewBound() observables are still running.")).pushChangeHandler(new HorizontalChangeHandler()).popChangeHandler(new HorizontalChangeHandler()));
}
use of com.bluelinelabs.conductor.changehandler.HorizontalChangeHandler in project Conductor by bluelinelabs.
the class ControllerChangeHandlerTests method testSaveRestore.
@Test
public void testSaveRestore() {
HorizontalChangeHandler horizontalChangeHandler = new HorizontalChangeHandler();
FadeChangeHandler fadeChangeHandler = new FadeChangeHandler(120, false);
RouterTransaction transaction = RouterTransaction.with(new TestController()).pushChangeHandler(horizontalChangeHandler).popChangeHandler(fadeChangeHandler);
RouterTransaction restoredTransaction = new RouterTransaction(transaction.saveInstanceState());
ControllerChangeHandler restoredHorizontal = restoredTransaction.pushChangeHandler();
ControllerChangeHandler restoredFade = restoredTransaction.popChangeHandler();
assertEquals(horizontalChangeHandler.getClass(), restoredHorizontal.getClass());
assertEquals(fadeChangeHandler.getClass(), restoredFade.getClass());
HorizontalChangeHandler restoredHorizontalCast = (HorizontalChangeHandler) restoredHorizontal;
FadeChangeHandler restoredFadeCast = (FadeChangeHandler) restoredFade;
assertEquals(horizontalChangeHandler.getAnimationDuration(), restoredHorizontalCast.getAnimationDuration());
assertEquals(horizontalChangeHandler.removesFromViewOnPush(), restoredHorizontalCast.removesFromViewOnPush());
assertEquals(fadeChangeHandler.getAnimationDuration(), restoredFadeCast.getAnimationDuration());
assertEquals(fadeChangeHandler.removesFromViewOnPush(), restoredFadeCast.removesFromViewOnPush());
}
use of com.bluelinelabs.conductor.changehandler.HorizontalChangeHandler in project Conductor by bluelinelabs.
the class MasterDetailListController method onRowSelected.
void onRowSelected(int index) {
selectedIndex = index;
DetailItemModel model = DetailItemModel.values()[index];
ChildController controller = new ChildController(model.detail, model.backgroundColor, true);
if (twoPaneView) {
getChildRouter(detailContainer).setRoot(RouterTransaction.with(controller));
} else {
getRouter().pushController(RouterTransaction.with(controller).pushChangeHandler(new HorizontalChangeHandler()).popChangeHandler(new HorizontalChangeHandler()));
}
}
Aggregations