Skip to content
oupson edited this page Jun 13, 2019 · 1 revision

Use this library with java :

Load an Apng :

ApngAnimator a =  ApngAnimatorKt.loadApng(imageView, imageUrl);

Using kotlin lambda :

a.onLoaded((animator) -> {
    animator.setOnFrameChangeLister((index) ->
        if (index == 0)
            Log.i(TAG, "Loop");
        }
        return Unit.INSTANCE;
    });
    return Unit.INSTANCE;
});
Clone this wiki locally