Search in sources :

Example 1 with Repeater

use of com.airbnb.lottie.model.content.Repeater in project lottie-android by airbnb.

the class RepeaterParser method parse.

static Repeater parse(JsonReader reader, LottieComposition composition) throws IOException {
    String name = null;
    AnimatableFloatValue copies = null;
    AnimatableFloatValue offset = null;
    AnimatableTransform transform = null;
    boolean hidden = false;
    while (reader.hasNext()) {
        switch(reader.selectName(NAMES)) {
            case 0:
                name = reader.nextString();
                break;
            case 1:
                copies = AnimatableValueParser.parseFloat(reader, composition, false);
                break;
            case 2:
                offset = AnimatableValueParser.parseFloat(reader, composition, false);
                break;
            case 3:
                transform = AnimatableTransformParser.parse(reader, composition);
                break;
            case 4:
                hidden = reader.nextBoolean();
                break;
            default:
                reader.skipValue();
        }
    }
    return new Repeater(name, copies, offset, transform, hidden);
}
Also used : AnimatableTransform(com.airbnb.lottie.model.animatable.AnimatableTransform) AnimatableFloatValue(com.airbnb.lottie.model.animatable.AnimatableFloatValue) Repeater(com.airbnb.lottie.model.content.Repeater)

Aggregations

AnimatableFloatValue (com.airbnb.lottie.model.animatable.AnimatableFloatValue)1 AnimatableTransform (com.airbnb.lottie.model.animatable.AnimatableTransform)1 Repeater (com.airbnb.lottie.model.content.Repeater)1