Search in sources :

Example 6 with AnimationsSet

use of su.levenetc.android.textsurface.animations.AnimationsSet in project TextSurface by elevenetc.

the class SurfaceTransSample method play.

public static void play(TextSurface textSurface) {
    Text textA = TextBuilder.create("TextA").setPosition(Align.SURFACE_CENTER).build();
    Text textB = TextBuilder.create("TextB").setPosition(Align.RIGHT_OF | Align.BOTTOM_OF, textA).build();
    Text textC = TextBuilder.create("TextC").setPosition(Align.LEFT_OF | Align.BOTTOM_OF, textB).build();
    Text textD = TextBuilder.create("TextD").setPosition(Align.RIGHT_OF | Align.BOTTOM_OF, textC).build();
    int duration = 500;
    textSurface.play(TYPE.SEQUENTIAL, Alpha.show(textA, duration), new AnimationsSet(TYPE.PARALLEL, Alpha.show(textB, duration), new TransSurface(duration, textB, Pivot.CENTER)), new AnimationsSet(TYPE.PARALLEL, Alpha.show(textC, duration), new TransSurface(duration, textC, Pivot.CENTER)), new AnimationsSet(TYPE.PARALLEL, Alpha.show(textD, duration), new TransSurface(duration, textD, Pivot.CENTER)), new TransSurface(duration, textC, Pivot.CENTER), new TransSurface(duration, textB, Pivot.CENTER), new TransSurface(duration, textA, Pivot.CENTER));
}
Also used : TransSurface(su.levenetc.android.textsurface.animations.TransSurface) Text(su.levenetc.android.textsurface.Text) AnimationsSet(su.levenetc.android.textsurface.animations.AnimationsSet)

Aggregations

Text (su.levenetc.android.textsurface.Text)6 AnimationsSet (su.levenetc.android.textsurface.animations.AnimationsSet)6 TransSurface (su.levenetc.android.textsurface.animations.TransSurface)4 Loop (su.levenetc.android.textsurface.animations.Loop)1 ScaleSurface (su.levenetc.android.textsurface.animations.ScaleSurface)1