.node(newNode)
.path(cIn)
;
ScaleTransitionBuilder zoomOut = ScaleTransitionBuilder.create()
.duration(new Duration(1000))
.toX(0.2)
.toY(0.2)
.interpolator(Interpolator.EASE_BOTH);
ScaleTransitionBuilder zoomIn = ScaleTransitionBuilder.create()
.duration(new Duration(1000))
.fromX(0.2)
.fromY(0.2)
.toX(0.7)
.toY(0.7)
.interpolator(Interpolator.EASE_BOTH);
Animation main = ParallelTransitionBuilder.create()
.children(
zoomOut.node(curNode).build(),
zoomIn.node(newNode).build(),
moveIn.build(),
moveOut.build()
,
FadeTransitionBuilder.create()
.node(curNode)
.duration(new Duration(1000))
.fromValue(1)
.toValue(0)
.build(),
moveOut.build(),
FadeTransitionBuilder.create()
.node(newNode)
.duration(new Duration(1000))
.fromValue(0)
.toValue(1)
.build()
)
.build();
ScaleTransitionBuilder zoomOut1 = ScaleTransitionBuilder.create()
.duration(new Duration(300))
.toX(0.7)
.toY(0.7)
.interpolator(Interpolator.EASE_BOTH);
ScaleTransitionBuilder zoomIn1 = ScaleTransitionBuilder.create()
.duration(new Duration(300))
.toX(1)
.toY(1)
.interpolator(Interpolator.EASE_BOTH);
return SequentialTransitionBuilder.create()
.children(
ParallelTransitionBuilder.create().children(
zoomOut1.node(curNode).build(),
zoomOut1.node(newNode).build()
).build(),
main,
ParallelTransitionBuilder.create().children(
zoomIn1.node(curNode).build(),
zoomIn1.node(newNode).build()
).build()
)
.build();
// return RotateTransitionBuilder.create()
// .axis(Rotate.Y_AXIS)