Search in sources :

Example 1 with ScaleSurface

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

the class SurfaceScaleSample method play.

public static void play(TextSurface textSurface) {
    Text textA = TextBuilder.create("How are you?").setPosition(Align.SURFACE_CENTER).build();
    Text textB = TextBuilder.create("Would you mind?").setPosition(Align.BOTTOM_OF | Align.CENTER_OF, textA).build();
    Text textC = TextBuilder.create("Yes!").setPosition(Align.BOTTOM_OF | Align.CENTER_OF, textB).build();
    textSurface.play(TYPE.SEQUENTIAL, Alpha.show(textA, 500), new AnimationsSet(TYPE.PARALLEL, new AnimationsSet(TYPE.PARALLEL, Alpha.show(textB, 500), Alpha.hide(textA, 500)), new ScaleSurface(500, textB, Fit.WIDTH)), Delay.duration(1000), new AnimationsSet(TYPE.PARALLEL, new AnimationsSet(TYPE.PARALLEL, Alpha.show(textC, 500), Alpha.hide(textB, 500)), new ScaleSurface(500, textC, Fit.WIDTH)));
}
Also used : ScaleSurface(su.levenetc.android.textsurface.animations.ScaleSurface) Text(su.levenetc.android.textsurface.Text) AnimationsSet(su.levenetc.android.textsurface.animations.AnimationsSet)

Aggregations

Text (su.levenetc.android.textsurface.Text)1 AnimationsSet (su.levenetc.android.textsurface.animations.AnimationsSet)1 ScaleSurface (su.levenetc.android.textsurface.animations.ScaleSurface)1