AXrLottie (Android) Renders animations and vectors exported in the bodymovin JSON format. (Using rLottie)

Overview

AXrLottie Renders animations
and vectors exported in the bodymovin JSON format
GitHubReleases

LCoders | AmirHosseinAghajari
picker

What is lottie?

Lottie loads and renders animations and vectors exported in the bodymovin JSON format. Bodymovin JSON can be created and exported from After Effects with bodymovin, Sketch with Lottie Sketch Export, and from Haiku.

For the first time, designers can create and ship beautiful animations without an engineer painstakingly recreating it by hand. Since the animation is backed by > JSON they are extremely small in size but can be large in complexity!

What is rlottie?

rlottie is a platform independent standalone c++ library for rendering vector based animations and art in realtime.

What is AXrLottie?

AXrLottie includes rlottie into the Android. Easy A!

Lottie Examples

Screenshot

Table of Contents

Changelogs

1.1.0 :

  • New Optional library! AXrLottieGlideDecoder
  • SetDefaultOptions added to AXrLottie
  • OnError,OnLoaded added to OnLottieLoaderListener

Other versions changelog

Installation

AXrLottie is available in the JCenter, so you just need to add it as a dependency (Module gradle)

Gradle

implementation 'com.aghajari.rlottie:AXrLottie:1.1.0'

Maven

<dependency>
  <groupId>com.aghajari.rlottiegroupId>
  <artifactId>AXrLottieartifactId>
  <version>1.1.0version>
  <type>pomtype>
dependency>

Usage

Let's START! 😃

Install AXrLottie

First step, you should initialize AXrLottie

AXrLottie.init(this);

Basic Usage

Create an AXrLottieImageView in your layout.

<com.aghajari.rlottie.AXrLottieImageView
        android:id="@+id/lottie_view"
        android:layout_width="180dp"
        android:layout_height="180dp"
        android:layout_gravity="center"/>

Now you just need to load your lottie Animation

lottieView.setLottieDrawable(AXrLottieDrawable.fromAssets(this,fileName)
                .setSize(width,height)
                .build());
lottieView.playAnimation();

you can load lottie file from following sources :

  • File
  • JSON (String)
  • URL
  • Assets
  • Resource
  • InputStram

lottie will cache animations/files by default. you can disable cache in AXrLottieDrawable Builder

Output

Back to contents

LayerProperty

To update a property at runtime, you need 3 things:

  1. KeyPath
  2. AXrLottieProperty
  3. setLayerProperty(KeyPath, AXrLottieProperty)
lottieDrawable.setLayerProperty("**" /**KeyPath*/, AXrLottieProperty.fillColor(color) /**AXrLottieProperty*/);

Output

KeyPath

A KeyPath is used to target a specific content or a set of contents that will be updated. A KeyPath is specified by a list of strings that correspond to the hierarchy of After Effects contents in the original animation. KeyPaths can include the specific name of the contents or wildcards:

  • Wildcard *
    • Wildcards match any single content name in its position in the keypath.
  • Globstar **
    • Globstars match zero or more layers.

Keypath should contains object names separated by (.) and can handle globe(**) or wildchar(*).

  • To change the property of fill1 object in the layer1->group1->fill1 : KeyPath = layer1.group1.fill1
  • If all the property inside group1 needs to be changed : KeyPath = **.group1.**

Properties

  • FillColor
  • FillOpacity
  • StrokeColor
  • StrokeOpacity
  • StrokeWidth
  • TrAnchor
  • TrOpacity
  • TrPosition
  • TrRotation
  • TrScale

DynamicProperties

Since v1.0.6 you can set dynamic properties to a layer!

Example :

lottieDrawable.setLayerProperty("**" /**KeyPath*/,
        AXrLottieProperty.dynamicFillColor(new AXrLottieProperty.DynamicProperty<Integer>() {
            @Override
            public Integer getValue(int frame) {
                if (frame > 40)
                    return Color.RED;
                else
                    return Color.BLUE;
            }
        }));

Back to contents

Layers

AXrLottieLayerInfo contains Layer's name,type,inFrame and outFrame.

for (AXrLottieLayerInfo layerInfo : lottieDrawable.getLayers()) {
    Log.i("AXrLottie", layerInfo.toString());
}

Back to contents

Markers

Markers exported form AE are used to describe a segment of an animation {comment/tag , startFrame, endFrame} Marker can be use to divide a resource in to separate animations by tagging the segment with comment string , start frame and duration of that segment.

More...

AXrLottieMarker contains comment/tag, inFrame and outFrame.

for (AXrLottieMarker marker : lottieDrawable.getMarkers()) {
    Log.i("AXrLottie", marker.toString());
}

You can select a marker in AXrLottieDrawable and set start&end frame of the animation with an AXrLottieMarker :

lottieDrawable.selectMarker(MARKER);

Markers in a JSON:

"markers":[{"tm":IN_FRAME,"cm":"COMMENT","dr":DURATION},...]

Example :

"markers":[{"tm":0,"cm":"first","dr":69.33},{"tm":69.33,"cm":"second","dr":69.33},{"tm":138.66,"cm":"third","dr":67.33}]

Back to contents

Lottie2Gif

you can export lottie animations as a GIF! thanks to gif-h

AXrLottie2Gif.create(lottieDrawable)
                .setListener(new AXrLottie2Gif.Lottie2GifListener() {
                    long start;

                    @Override
                    public void onStarted() {
                        start = System.currentTimeMillis();
                    }

                    @Override
                    public void onProgress(int frame, int totalFrame) {
                        log("progress : " + frame + "/" + totalFrame);
                    }

                    @Override
                    public void onFinished() {
                        log("GIF created (" + (System.currentTimeMillis() - start) + "ms)\r\n" +
                                "Resolution : " + gifSize + "x" + gifSize + "\r\n" +
                                "Path : " + file.getAbsolutePath() + "\r\n" +
                                "File Size : " + (file.length() / 1024) + "kb");
                    }
                })
                .setBackgroundColor(Color.WHITE)
                .setOutputPath(file)
                .setSize(gifSize, gifSize)
                .setBackgroundTask(true)
                .setDithering(false)
                .setDestroyable(true)
                .build();

Output

lottie.gif has been exported by AXrLottie2Gif

Back to contents

Listeners

OnFrameChangedListener:

void onFrameChanged(AXrLottieDrawable drawable, int frame);
void onRepeat (int repeatedCount,boolean lastFrame);
void onStop();
void onStart();
void onRecycle();

OnFrameRenderListener:

void onUpdate(AXrLottieDrawable drawable, int frame, long timeDiff, boolean force);
Bitmap renderFrame(AXrLottieDrawable drawable, Bitmap bitmap, int frame);

Back to contents

NetworkFetcher

Simple way to load lottie from URL (SimpleNetworkFetcher) :

AXrLottieDrawable.fromURL(URL)
	.build()

AXrLottie has a default network fetching stack built on HttpURLConnection. However, if you would like to hook into your own network stack for performance, caching, or analytics, you may replace the internal stack with your own.

AXrLottie.setNetworkFetcher(OkHttpNetworkFetcher.create());

AXrLottieDrawable.fromURL(URL)
	.build()

Back to contents

FileExtension

FileExtension specifies which type of files can be used in lottie.

As default, AXrLottie supports JSON , ZIP (must have a json file) , GZIP (just like .tgs).

You can add more FileExtensions (such as .7z).

Example :

AXrLottie.addFileExtension(new SevenZipFileExtension());   
import org.apache.commons.compress.archivers.sevenz.SevenZArchiveEntry;
import org.apache.commons.compress.archivers.sevenz.SevenZFile;

public class SevenZipFileExtension extends AXrFileExtension {

    public SevenZipFileExtension() {
        super(".7z");
    }

    @Override
    public boolean canParseContent(String contentType) {
    	// check content-type
        return contentType.contains("application/x-7z-compressed");
    }

    @Override
    public File toFile(String cache, File input, boolean fromNetwork) throws IOException {
    	// read 7zip file and extract animation.
        SevenZFile sevenZFile = new SevenZFile(input);
        SevenZArchiveEntry entry = sevenZFile.getNextEntry();
        if (((List<SevenZArchiveEntry>) sevenZFile.getEntries()).size() > 1) {
            throw new IllegalArgumentException("7zip file must contains only one json file!");
        }
        File output = AXrLottie.getLottieCacheManager().getCachedFile(cache, JsonFileExtension.JSON, fromNetwork, false);
        if (entry != null) {
            FileOutputStream out = new FileOutputStream(output);
            byte[] content = new byte[(int) entry.getSize()];
            sevenZFile.read(content, 0, content.length);
            out.write(content);
            out.close();
        }
        sevenZFile.close();
        return output;
    }
}

Add Telegram Animated Stickers support :

AXrLottie.addFileExtension(new GZipFileExtension(".tgs"));

Back to contents

AXrLottieGlideDecoder

AXrLottieGlideDecoder is a Glide integration library for displaying AXrLottieDrawable.

Example :

Glide.with(this)
        .load(Uri.parse("file:///android_asset/loader.json"))
        .set(AXrLottieGlideOptions.ENABLED, true)
        .set(AXrLottieGlideOptions.NAME, "loader.json")
        .set(AXrLottieGlideOptions.NETWORK, false)
        .into(imageView);

Back to contents

AnimatedSticker - AXEmojiView

you can create AXrLottieImageView in AXEmojiView/StickerView using this code :

AXEmojiManager.setStickerViewCreatorListener(new StickerViewCreatorListener() {
    @Override
    public View onCreateStickerView(@NonNull Context context, @Nullable StickerCategory category, boolean isRecent) {
        return new AXrLottieImageView(context);
    }
    
    @Override
    public View onCreateCategoryView(@NonNull Context context) {
        return new AXrLottieImageView(context);
    }
});

add this just after AXEmojiManager.install

and you can load your animations in StickerProvider

  @Override
  public StickerLoader getLoader() {
        return new StickerLoader() {
            @Override
            public void onLoadSticker(View view, Sticker sticker) {
                if (view instanceof AXrLottieImageView && sticker instanceof AnimatedSticker) {
                    AXrLottieImageView lottieImageView = (AXrLottieImageView) view;
                    AnimatedSticker animatedSticker = (AnimatedSticker) sticker;
                    if (animatedSticker.drawable==null){
                        animatedSticker.drawable = Utils.createFromSticker(view.getContext(),animatedSticker,100);
                    }
                    lottieImageView.setLottieDrawable(animatedSticker.drawable);
                    lottieImageView.playAnimation();
                }
            }

            @Override
            public void onLoadStickerCategory(View view, StickerCategory stickerCategory, boolean selected) {
                if (view instanceof AXrLottieImageView) {
                    AXrLottieImageView lottieImageView = (AXrLottieImageView) view;
                    AnimatedSticker animatedSticker = (AnimatedSticker) stickerCategory.getCategoryData();
                    if (animatedSticker.drawable==null){
                        animatedSticker.drawable = Utils.createFromSticker(view.getContext(),animatedSticker,50);
                    }
                    lottieImageView.setLottieDrawable(animatedSticker.drawable);
                    //lottieImageView.playAnimation();
                }
            }
        };
  }

Output

Back to contents

Author

License

Copyright 2020 Amir Hossein Aghajari
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.



LCoders | AmirHosseinAghajari
Amir Hossein Aghajari • EmailGitHub
Comments
  • Can't assemble

    Can't assemble

    @Aghajari Please help me to pre-release

    /home/jitpack/build/AXrLottie/src/main/cpp/src/vector/vdrawhelper_neon.cpp:17: error: undefined reference to 'pixman_composite_src_n_8888_asm_neon'
    /home/jitpack/build/AXrLottie/src/main/cpp/src/vector/vdrawhelper_neon.cpp:26: error: undefined reference to 'pixman_composite_over_n_8888_asm_neon'
    

    This is the full log: https://jitpack.io/com/github/hantrungkien/AXrLottie/1.0.4-alpha01/build.log

    Many thansk!

    opened by hantrungkien 8
  • could not load needed library 'librlottie.so' for 'libjlottie.so' (load_library[1095]: Library 'librlottie.so' not found)

    could not load needed library 'librlottie.so' for 'libjlottie.so' (load_library[1095]: Library 'librlottie.so' not found)

    I got this error when I debugged the app on LG Optimus L9: java.lang.ExceptionInInitializerError at com.hyapp.a18chat.bl.App.onCreate(App.java:26) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1002) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4252) at android.app.ActivityThread.access$1300(ActivityThread.java:135) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1261) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4849) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1893]: 141 could not load needed library 'librlottie.so' for 'libjlottie.so' (load_library[1095]: Library 'librlottie.so' not found) at java.lang.Runtime.loadLibrary(Runtime.java:370) at java.lang.System.loadLibrary(System.java:538) at com.aghajari.rlottie.AXrLottie.<clinit>(AXrLottie.java:48) at com.hyapp.a18chat.bl.App.onCreate(App.java:26)  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1002)  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4252)  at android.app.ActivityThread.access$1300(ActivityThread.java:135)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1261)  at android.os.Handler.dispatchMessage(Handler.java:99)  at android.os.Looper.loop(Looper.java:137)  at android.app.ActivityThread.main(ActivityThread.java:4849)  at java.lang.reflect.Method.invokeNative(Native Method)  at java.lang.reflect.Method.invoke(Method.java:511)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562)  at dalvik.system.NativeStart.main(Native Method) 

    This error occurred in this line of code: AXrLottie.init(this);

    opened by hysapp 6
  • Crash when load lottie by url with extension

    Crash when load lottie by url with extension ".json"

    My Code: link url = https://files-5.gapo.vn/sticker/origin/234f279b-1342-4b8a-8673-5fc11e3bfbba.json

    binding.imgSticker.lottieDrawable = AXrLottieDrawable.fromURL(stickerUrl)
                    .setSize(size,size)
                    .setAutoRepeat(true)
                    .setAutoStart(true)
                    .build()
    

    My error console: java.net.MalformedURLException: no protocol: lottie_cache_httpsfiles5gapovnstickerorigin6525deecc18545a58adea943441c0bd9json

    Thanks.

    opened by chihung93 5
  • Abstract fetcher

    Abstract fetcher

    • refactor network: abstract fetcher
    • modified AXrLottieDrawable.setCustomEndFrame() same as Telegram latest version
    • add OkHttpFetcher & Lottie Initialize to the example
    • clean code base
    opened by hantrungkien 4
  • Can not build package an lib for changing src?

    Can not build package an lib for changing src?

    Hello, good morning @Aghajari I can not build your lib to AAR. Please help me to build it to modify some code and improve.

    I run this gradle script:

    install {
        repositories.mavenInstaller {
            pom.project {
                packaging 'aar'
                groupId artifact.groupId
                artifactId artifact.id
                version artifact.version
                name artifact.id // pom.project.name must be same as bintray.pkg.name
                url artifact.siteUrl
                inceptionYear '2020' // HARDCODED
                licenses {
                    license { // HARDCODED
                        name 'The Apache Software License, Version 2.0'
                        url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
                        distribution 'repo'
                    }
                }
                scm {
                    connection artifact.gitUrl
                    developerConnection artifact.gitUrl
                    url artifact.siteUrl
                }
            }
        }
    }
    

    My Error:

    /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/src/vector/vdrawhelper_neon.cpp:26: error: undefined reference to 'pixman_composite_over_n_8888_asm_neon'

    
    
    Execution failed for task ':AXrLottie:externalNativeBuildRelease'.
    > Build command failed.
      Error while executing process /Users/henry/Library/Android/sdk/cmake/3.10.2.4988404/bin/ninja with arguments {-C /Users/henry/Downloads/AXrLottie-master/AXrLottie/.cxx/cmake/release/armeabi-v7a jlottie jlz4 rlottie rlottie-image-loader rlottie2gif}
      ninja: Entering directory `/Users/henry/Downloads/AXrLottie-master/AXrLottie/.cxx/cmake/release/armeabi-v7a'
      [1/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vdrawhelper_sse2.cpp.o
      [2/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/freetype/v_ft_math.cpp.o
      [3/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/freetype/v_ft_raster.cpp.o
      [4/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/freetype/v_ft_stroker.cpp.o
      [5/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vdebug.cpp.o
      [6/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vrect.cpp.o
      [7/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vdrawhelper_neon.cpp.o
      [8/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vdrawhelper_common.cpp.o
      [9/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vbrush.cpp.o
      [10/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vpathmesure.cpp.o
      [11/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vpainter.cpp.o
      [12/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vbitmap.cpp.o
      [13/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/velapsedtimer.cpp.o
      [14/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vmatrix.cpp.o
      [15/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vdasher.cpp.o
      [16/41] Building CXX object CMakeFiles/rlottie.dir/src/lottie/lottieproxymodel.cpp.o
      [17/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vinterpolator.cpp.o
      [18/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/varenaalloc.cpp.o
      [19/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vpath.cpp.o
      [20/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vrle.cpp.o
      [21/41] Building CXX object CMakeFiles/rlottie2gif.dir/gif/gif.cpp.o
      [22/41] Linking CXX shared library /Users/henry/Downloads/AXrLottie-master/AXrLottie/build/intermediates/cmake/release/obj/armeabi-v7a/librlottie2gif.so
      [23/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vbezier.cpp.o
      [24/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vimageloader.cpp.o
      [25/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vdrawhelper.cpp.o
      [26/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vdrawable.cpp.o
      [27/41] Building CXX object CMakeFiles/rlottie.dir/src/lottie/lottiekeypath.cpp.o
      [28/41] Building CXX object CMakeFiles/rlottie.dir/src/vector/vraster.cpp.o
      [29/41] Building CXX object CMakeFiles/rlottie.dir/src/lottie/lottieitem_capi.cpp.o
      [30/41] Building CXX object CMakeFiles/jlottie.dir/lottie.cpp.o
      In file included from /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:14:
      In file included from /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/gif/gif.h:63:
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/gif/../lottie.h:8:1: warning: typedef requires a name [-Wmissing-declarations]
      typedef struct LottieWrapper{
      ^~~~~~~
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/gif/../lottie.h:13:1: warning: typedef requires a name [-Wmissing-declarations]
      typedef struct LottieInfo{
      ^~~~~~~
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:116:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
          if (ptr == NULL) {
              ~~~ ^  ~~~~
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:116:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
          if (ptr == NULL) {
                  ~~ ^~~~
                     0
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:169:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
          if (ptr == NULL) {
              ~~~ ^  ~~~~
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:169:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
          if (ptr == NULL) {
                  ~~ ^~~~
                     0
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:244:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
          if (ptr == NULL || bitmap == nullptr) {
              ~~~ ^  ~~~~
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:244:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
          if (ptr == NULL || bitmap == nullptr) {
                  ~~ ^~~~
                     0
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:322:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
          if (ptr == NULL) {
              ~~~ ^  ~~~~
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:322:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
          if (ptr == NULL) {
                  ~~ ^~~~
                     0
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:330:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
          if (ptr == NULL) {
              ~~~ ^  ~~~~
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:330:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
          if (ptr == NULL) {
                  ~~ ^~~~
                     0
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:346:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
          if (ptr == NULL) {
              ~~~ ^  ~~~~
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:346:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
          if (ptr == NULL) {
                  ~~ ^~~~
                     0
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:354:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
          if (ptr == NULL) {
              ~~~ ^  ~~~~
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:354:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
          if (ptr == NULL) {
                  ~~ ^~~~
                     0
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:369:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
          if (ptr == NULL || layer == nullptr) {
              ~~~ ^  ~~~~
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:369:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
          if (ptr == NULL || layer == nullptr) {
                  ~~ ^~~~
                     0
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:381:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
          if (ptr == NULL || layer == nullptr) {
              ~~~ ^  ~~~~
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:381:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
          if (ptr == NULL || layer == nullptr) {
                  ~~ ^~~~
                     0
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:393:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
          if (ptr == NULL || layer == nullptr) {
              ~~~ ^  ~~~~
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:393:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
          if (ptr == NULL || layer == nullptr) {
                  ~~ ^~~~
                     0
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:405:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
          if (ptr == NULL || layer == nullptr) {
              ~~~ ^  ~~~~
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:405:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
          if (ptr == NULL || layer == nullptr) {
                  ~~ ^~~~
                     0
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:417:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
          if (ptr == NULL || layer == nullptr) {
              ~~~ ^  ~~~~
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:417:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
          if (ptr == NULL || layer == nullptr) {
                  ~~ ^~~~
                     0
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:429:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
          if (ptr == NULL || layer == nullptr) {
              ~~~ ^  ~~~~
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:429:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
          if (ptr == NULL || layer == nullptr) {
                  ~~ ^~~~
                     0
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:441:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
          if (ptr == NULL || layer == nullptr) {
              ~~~ ^  ~~~~
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:441:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
          if (ptr == NULL || layer == nullptr) {
                  ~~ ^~~~
                     0
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:453:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
          if (ptr == NULL || layer == nullptr) {
              ~~~ ^  ~~~~
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:453:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
          if (ptr == NULL || layer == nullptr) {
                  ~~ ^~~~
                     0
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:465:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
          if (ptr == NULL || layer == nullptr) {
              ~~~ ^  ~~~~
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:465:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
          if (ptr == NULL || layer == nullptr) {
                  ~~ ^~~~
                     0
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:477:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
          if (ptr == NULL || layer == nullptr) {
              ~~~ ^  ~~~~
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:477:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
          if (ptr == NULL || layer == nullptr) {
                  ~~ ^~~~
                     0
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:493:13: warning: comparison between NULL and non-pointer ('jlong' (aka 'long long') and NULL) [-Wnull-arithmetic]
          if (ptr == NULL) {
              ~~~ ^  ~~~~
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/lottie.cpp:493:16: warning: implicit conversion of NULL constant to 'long long' [-Wnull-conversion]
          if (ptr == NULL) {
                  ~~ ^~~~
                     0
      38 warnings generated.
      [31/41] Building CXX object CMakeFiles/rlottie.dir/src/lottie/lottieloader.cpp.o
      [32/41] Building CXX object CMakeFiles/rlottie.dir/src/lottie/lottiemodel.cpp.o
      [33/41] Building CXX object src/vector/stb/CMakeFiles/rlottie-image-loader.dir/stb_image.cpp.o
      [34/41] Linking CXX shared library /Users/henry/Downloads/AXrLottie-master/AXrLottie/build/intermediates/cmake/release/obj/armeabi-v7a/librlottie-image-loader.so
      [35/41] Building C object CMakeFiles/jlz4.dir/lz4/lz4.c.o
      [36/41] Linking C shared library /Users/henry/Downloads/AXrLottie-master/AXrLottie/build/intermediates/cmake/release/obj/armeabi-v7a/libjlz4.so
      [37/41] Building CXX object CMakeFiles/rlottie.dir/src/lottie/lottieanimation.cpp.o
      [38/41] Building CXX object CMakeFiles/rlottie.dir/src/lottie/lottieitem.cpp.o
      [39/41] Building CXX object CMakeFiles/rlottie.dir/src/lottie/lottieparser.cpp.o
      [40/41] Linking CXX shared library /Users/henry/Downloads/AXrLottie-master/AXrLottie/build/intermediates/cmake/release/obj/armeabi-v7a/librlottie.so
      FAILED: /Users/henry/Downloads/AXrLottie-master/AXrLottie/build/intermediates/cmake/release/obj/armeabi-v7a/librlottie.so 
      : && /Users/henry/Library/Android/sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=armv7-none-linux-androideabi16 --gcc-toolchain=/Users/henry/Library/Android/sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/darwin-x86_64 --sysroot=/Users/henry/Library/Android/sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security  -std=c++14 -Oz -DNDEBUG  -Wl,--exclude-libs,libgcc_real.a -Wl,--exclude-libs,libatomic.a -static-libstdc++ -Wl,--build-id -Wl,--fatal-warnings -Wl,--exclude-libs,libunwind.a -Wl,--no-undefined -Qunused-arguments -shared -Wl,-soname,librlottie.so -o /Users/henry/Downloads/AXrLottie-master/AXrLottie/build/intermediates/cmake/release/obj/armeabi-v7a/librlottie.so CMakeFiles/rlottie.dir/src/vector/freetype/v_ft_math.cpp.o CMakeFiles/rlottie.dir/src/vector/freetype/v_ft_raster.cpp.o CMakeFiles/rlottie.dir/src/vector/freetype/v_ft_stroker.cpp.o CMakeFiles/rlottie.dir/src/vector/vrect.cpp.o CMakeFiles/rlottie.dir/src/vector/vdasher.cpp.o CMakeFiles/rlottie.dir/src/vector/vbrush.cpp.o CMakeFiles/rlottie.dir/src/vector/vbitmap.cpp.o CMakeFiles/rlottie.dir/src/vector/vpainter.cpp.o CMakeFiles/rlottie.dir/src/vector/vdrawhelper_common.cpp.o CMakeFiles/rlottie.dir/src/vector/vdrawhelper.cpp.o CMakeFiles/rlottie.dir/src/vector/vdrawhelper_sse2.cpp.o CMakeFiles/rlottie.dir/src/vector/vdrawhelper_neon.cpp.o CMakeFiles/rlottie.dir/src/vector/vrle.cpp.o CMakeFiles/rlottie.dir/src/vector/vpath.cpp.o CMakeFiles/rlottie.dir/src/vector/vpathmesure.cpp.o CMakeFiles/rlottie.dir/src/vector/vmatrix.cpp.o CMakeFiles/rlottie.dir/src/vector/velapsedtimer.cpp.o CMakeFiles/rlottie.dir/src/vector/vdebug.cpp.o CMakeFiles/rlottie.dir/src/vector/vinterpolator.cpp.o CMakeFiles/rlottie.dir/src/vector/vbezier.cpp.o CMakeFiles/rlottie.dir/src/vector/vraster.cpp.o CMakeFiles/rlottie.dir/src/vector/vdrawable.cpp.o CMakeFiles/rlottie.dir/src/vector/vimageloader.cpp.o CMakeFiles/rlottie.dir/src/vector/varenaalloc.cpp.o CMakeFiles/rlottie.dir/src/lottie/lottieitem.cpp.o CMakeFiles/rlottie.dir/src/lottie/lottieitem_capi.cpp.o CMakeFiles/rlottie.dir/src/lottie/lottieloader.cpp.o CMakeFiles/rlottie.dir/src/lottie/lottiemodel.cpp.o CMakeFiles/rlottie.dir/src/lottie/lottieproxymodel.cpp.o CMakeFiles/rlottie.dir/src/lottie/lottieparser.cpp.o CMakeFiles/rlottie.dir/src/lottie/lottieanimation.cpp.o CMakeFiles/rlottie.dir/src/lottie/lottiekeypath.cpp.o  -Wl,--version-script=/Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/rlottie.expmap -ldl -Wl,--no-undefined -latomic -lm && :
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/src/vector/vdrawhelper_neon.cpp:17: error: undefined reference to 'pixman_composite_src_n_8888_asm_neon'
      /Users/henry/Downloads/AXrLottie-master/AXrLottie/src/main/cpp/src/vector/vdrawhelper_neon.cpp:26: error: undefined reference to 'pixman_composite_over_n_8888_asm_neon'
      clang++: error: linker command failed with exit code 1 (use -v to see invocation)
      ninja: build stopped: subcommand failed.
    
    opened by chihung93 4
  • setAutoRepeat false not working, keeps repeating

    setAutoRepeat false not working, keeps repeating

    Example reproduction code:

    setLottieDrawable(
      AXrLottieDrawable.fromJson(jsonString, cacheKey)
          .setSize(decodeWidth, decodeHeight)
          .setAutoRepeat(false)
          .setSpeed(speed) // speed is set to 1.0f
          .build()
    );
    
    playAnimation();
    

    Observation vs. Expectation

    I expect the animation to only play once, and then stop. However, the animation keeps repeating.

    opened by hannojg 3
  • Crash when constructing AXrLottieDrawable

    Crash when constructing AXrLottieDrawable

    Hello, I'm seeing a crash (from analytics, I haven't been able to reproduce it myself yet) when initializing an AXrLottieDrawable:

    Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.os.Handler.post(java.lang.Runnable)' on a null object reference
           at com.aghajari.rlottie.DispatchQueue.postRunnable(DispatchQueue.java:91)
           at com.aghajari.rlottie.DispatchQueue.postRunnable(DispatchQueue.java:81)
           at com.aghajari.rlottie.DispatchQueuePool.execute(DispatchQueuePool.java:94)
           at com.aghajari.rlottie.AXrLottieDrawable.scheduleNextGetFrame(AXrLottieDrawable.java:849)
           at com.aghajari.rlottie.AXrLottieDrawable.setAllowDecodeSingleFrame(AXrLottieDrawable.java:689)
           at com.aghajari.rlottie.AXrLottieDrawable.initFromJson(AXrLottieDrawable.java:491)
           at com.aghajari.rlottie.AXrLottieDrawable.<init>(AXrLottieDrawable.java:438)
           at com.aghajari.rlottie.AXrLottieDrawable$Builder.build(AXrLottieDrawable.java:1329)
    

    After a bit of investigation, this seems to happen at this line of DispatchQueue.

    I think the source of the NPE could be in the try/catch statement a few lines before, my guess is that syncLatch.await(); throws an InterruptedException before being released, which would lead to handler being null.

    opened by fourlastor 3
  • Random crashes in com.aghajari.rlottie.DispatchQueuePool

    Random crashes in com.aghajari.rlottie.DispatchQueuePool

        java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference
            at com.aghajari.rlottie.DispatchQueuePool$2$1.run(DispatchQueuePool.java:102)
            at android.os.Handler.handleCallback(Handler.java:938)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:223)
            at android.app.ActivityThread.main(ActivityThread.java:7660)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
    

    using with Glide

    I believe number of AXrLottieDrawable shown on screen highly affects the probability of the crash

    opened by dstukalov 3
  • LeakedClosableViolation

    LeakedClosableViolation

    I got this error on AXrLottie 1.1.0 but I have not found a fix for this error in any release after 1.1.0.

    D/StrictMode: StrictMode policy violation: android.os.strictmode.LeakedClosableViolation: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
    
            at android.os.StrictMode$AndroidCloseGuardReporter.report(StrictMode.java:1924)
    
            at dalvik.system.CloseGuard.warnIfOpen(CloseGuard.java:303)
    
            at java.io.FileOutputStream.finalize(FileOutputStream.java:492)
    
            at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:291)
    
            at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:278)
    
            at java.lang.Daemons$Daemon.run(Daemons.java:139)
    
            at java.lang.Thread.run(Thread.java:923)
    
         Caused by: java.lang.Throwable: Explicit termination method 'close' not called
    
            at dalvik.system.CloseGuard.openWithCallSite(CloseGuard.java:259)
    
            at dalvik.system.CloseGuard.open(CloseGuard.java:230)
    
            at java.io.FileOutputStream.<init>(FileOutputStream.java:253)
    
            at java.io.FileOutputStream.<init>(FileOutputStream.java:186)
    
            at com.aghajari.rlottie.extension.GZipFileExtension.toFile(GZipFileExtension.java:58)
    
            at com.aghajari.rlottie.extension.GZipFileExtension.toFile(GZipFileExtension.java:78)
    
            at com.aghajari.rlottie.extension.AXrFileExtension.toFile(AXrFileExtension.java:54)
    
            at com.aghajari.rlottie.decoder.AXrFileReader.read(AXrFileReader.java:107)
    
            at com.aghajari.rlottie.decoder.AXrFileReader.fromAssets(AXrFileReader.java:83)
    
            at com.aghajari.rlottie.AXrLottieDrawable.fromAssets(AXrLottieDrawable.java:1272)
    
            at com.aghajari.rlottie.AXrLottieDrawable.fromAssets(AXrLottieDrawable.java:1268)
    
            at com.aghajari.rlottie.AXrLottie$Loader.createFromAssets(AXrLottie.java:245)
    
    opened by Dolfik1 1
  • since minsdk is 16, we need to disable android neon which is enabled by default

    since minsdk is 16, we need to disable android neon which is enabled by default

    https://github.com/Samsung/rlottie/issues/462

    Right now it is enabled by default

    So, I added cmake flag to disable it since minsdk is 16 right now and it neon requires 23+. Without it build fails with:

    [39/41] Building CXX object CMakeFiles/rlottie.dir/src/lottie/lottieparser.cpp.
    [40/41] Linking CXX shared library /Users/liminiens/Documents/Code/AXrLottie/AXrLottie/build/intermediates/cmake/debug/obj/armeabi-v7a/librlottie.so
    FAILED: /Users/liminiens/Documents/Code/AXrLottie/AXrLottie/build/intermediates/cmake/debug/obj/armeabi-v7a/librlottie.so 
    : && /Users/liminiens/Library/Android/sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=armv7-none-linux-androideabi16 --gcc-toolchain=/Users/liminiens/Library/Android/sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/darwin-x86_64 --sysroot=/Users/liminiens/Library/Android/sdk/ndk/21.0.6113669/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security  -std=c++14 -O0 -fno-limit-debug-info  -Wl,--exclude-libs,libgcc_real.a -Wl,--exclude-libs,libatomic.a -static-libstdc++ -Wl,--build-id -Wl,--fatal-warnings -Wl,--exclude-libs,libunwind.a -Wl,--no-undefined -Qunused-arguments -shared -Wl,-soname,librlottie.so -o /Users/liminiens/Documents/Code/AXrLottie/AXrLottie/build/intermediates/cmake/debug/obj/armeabi-v7a/librlottie.so CMakeFiles/rlottie.dir/src/vector/freetype/v_ft_math.cpp.o CMakeFiles/rlottie.dir/src/vector/freetype/v_ft_raster.cpp.o CMakeFiles/rlottie.dir/src/vector/freetype/v_ft_stroker.cpp.o CMakeFiles/rlottie.dir/src/vector/vrect.cpp.o CMakeFiles/rlottie.dir/src/vector/vdasher.cpp.o CMakeFiles/rlottie.dir/src/vector/vbrush.cpp.o CMakeFiles/rlottie.dir/src/vector/vbitmap.cpp.o CMakeFiles/rlottie.dir/src/vector/vpainter.cpp.o CMakeFiles/rlottie.dir/src/vector/vdrawhelper_common.cpp.o CMakeFiles/rlottie.dir/src/vector/vdrawhelper.cpp.o CMakeFiles/rlottie.dir/src/vector/vdrawhelper_sse2.cpp.o CMakeFiles/rlottie.dir/src/vector/vdrawhelper_neon.cpp.o CMakeFiles/rlottie.dir/src/vector/vrle.cpp.o CMakeFiles/rlottie.dir/src/vector/vpath.cpp.o CMakeFiles/rlottie.dir/src/vector/vpathmesure.cpp.o CMakeFiles/rlottie.dir/src/vector/vmatrix.cpp.o CMakeFiles/rlottie.dir/src/vector/velapsedtimer.cpp.o CMakeFiles/rlottie.dir/src/vector/vdebug.cpp.o CMakeFiles/rlottie.dir/src/vector/vinterpolator.cpp.o CMakeFiles/rlottie.dir/src/vector/vbezier.cpp.o CMakeFiles/rlottie.dir/src/vector/vraster.cpp.o CMakeFiles/rlottie.dir/src/vector/vdrawable.cpp.o CMakeFiles/rlottie.dir/src/vector/vimageloader.cpp.o CMakeFiles/rlottie.dir/src/vector/varenaalloc.cpp.o CMakeFiles/rlottie.dir/src/lottie/lottieitem.cpp.o CMakeFiles/rlottie.dir/src/lottie/lottieitem_capi.cpp.o CMakeFiles/rlottie.dir/src/lottie/lottieloader.cpp.o CMakeFiles/rlottie.dir/src/lottie/lottiemodel.cpp.o CMakeFiles/rlottie.dir/src/lottie/lottieproxymodel.cpp.o CMakeFiles/rlottie.dir/src/lottie/lottieparser.cpp.o CMakeFiles/rlottie.dir/src/lottie/lottieanimation.cpp.o CMakeFiles/rlottie.dir/src/lottie/lottiekeypath.cpp.o  -Wl,--version-script=/Users/liminiens/Documents/Code/AXrLottie/AXrLottie/src/main/cpp/rlottie.expmap -ldl -Wl,--no-undefined -latomic -lm && :
    /Users/liminiens/Documents/Code/AXrLottie/AXrLottie/src/main/cpp/src/vector/vdrawhelper_neon.cpp:17: error: undefined reference to 'pixman_composite_src_n_8888_asm_neon'
    /Users/liminiens/Documents/Code/AXrLottie/AXrLottie/src/main/cpp/src/vector/vdrawhelper_neon.cpp:26: error: undefined reference to 'pixman_composite_over_n_8888_asm_neon'
    clang++: error: linker command failed with exit code 1 (use -v to see invocation)
    ninja: build stopped: subcommand failed.
    
    > Task :AXrLottie:externalNativeBuildDebug FAILED
    
    opened by Liminiens 1
  • Replace `DispatchQueuePool` using built-in `ThreadPoolExecutor`

    Replace `DispatchQueuePool` using built-in `ThreadPoolExecutor`

    During our usage of this library, there are a lot of crashes revolving around DispatchQueuePool. Therefore we replaced it with the built-in ThreadPoolExecutor, which ideally provides the same functionality. We didn't see any visual impact and can safely assume that this change works well.

    opened by superfashi 0
Releases(v1.4.0)
Owner
AmirHosseinAghajari
AmirHosseinAghajari
Render After Effects animations natively on Android and iOS, Web, and React Native

Lottie for Android, iOS, React Native, Web, and Windows Lottie is a mobile library for Android and iOS that parses Adobe After Effects animations expo

Airbnb 33.5k Jan 4, 2023
Combine ViewPager and Animations to provide a simple way to create applications' guide pages.

WoWoViewPager WoWoViewPager combines ViewPager and Animations to provide a simple way to create applications' guide pages. When users are dragging WoW

Nightonke 2.7k Dec 30, 2022
🍭🚀💗 Tutorials about animations with Animators, Animated Vector Drawables, Shared Transitions, and more

?????? Tutorials about animations with Animators, Animated Vector Drawables, Shared Transitions, and more

Smart Tool Factory 696 Dec 28, 2022
Examples of the use of animations in jetpack compose and view, as well as measurements of perfomance

AndroidAnimationWorld Примеры использования анимаций в jetpack compose и view, а также замеры perfomance для

Lukian Zhukov 7 Oct 22, 2022
☯️Sophisticated and cool intro with Material Motion Animations(No more viewpager transformer or Memory leak)

Material Intro Sophisticated and cool intro with Material Motion Animations. Who's using Material Intro? ?? Check out who's using Material Intro Inclu

Ranbir Singh 34 Sep 8, 2022
Actions for android animations. Inspired by libgdx scene2d actions.

Android Animations Actions Actions for android animations. Inspired by libgdx scene2d actions. The main goal of this project is making creating of com

dtx12 137 Nov 29, 2022
[] An Android library which allows developers to easily add animations to ListView items

DEPRECATED ListViewAnimations is deprecated in favor of new RecyclerView solutions. No new development will be taking place, but the existing versions

Niek Haarman 5.6k Dec 30, 2022
Android Transition animations explanation with examples.

UNMAINTAINED No maintainance is intended. The content is still valid as a reference but it won't contain the latest new stuff Android Transition Frame

Luis G. Valle 13.6k Dec 28, 2022
An Android library which provides simple Item animations to RecyclerView items

RecyclerViewItemAnimators Library Travis master: This repo provides: Appearance animations Simple animators for the item views Quick start You can now

Gabriele Mariotti 3.1k Dec 16, 2022
Library containing common animations needed for transforming ViewPager scrolling for Android v13+.

ViewPagerTransforms Library containing common animations needed for transforming ViewPager scrolling on Android v13+. This library is a rewrite of the

Ian Thomas 2.5k Dec 29, 2022
The lib can make the ActivityOptions animations use in Android api3.1+

ActivityOptionsICS 本项目停止维护 =========== f you are thinking on customizing the animation of Activity transition then probably you would look for Activit

Kale 591 Nov 18, 2022
Android library to create complex multi-state animations.

MultiStateAnimation Android library to create complex multi-state animations. Overview A class that allows for complex multi-state animations using An

Keepsafe 405 Nov 11, 2022
Circle based animations for Android (min. API 11)

CircularTools Circle based animations for Android (min. API 11) Currently implemented: Circular reveal Circular transform Radial reaction Reveal:YouTu

AutSoft 209 Jul 20, 2022
Lightweight Android library for cool activity transition animations

Bungee min SDK 16 (Android Jellybean 4.1) written in Java A lightweight, easy-to-use Android library that provides awesome activity transition animati

Dean Spencer 172 Nov 18, 2022
Repository for android animations Rx wrapper

RxAnimations RxAnimations is a library with the main goal to make android animations more solid and cohesive. Download compile 'oxim.digital:rxanim:

Mihael Francekovic 479 Dec 30, 2022
A lightweight android library that allows to you create custom fast forward/rewind animations like on Netflix.

SuperForwardView About A lightweight android library that allows to you create custom fast forward/rewind animations like on Netflix. GIF Design Credi

Ertugrul 77 Dec 9, 2022
Add Animatable Material Components in Android Jetpack Compose. Create jetpack compose animations painless.

AnimatableCompose Add Animatable Material Components in Android Jetpack Compose. Create jetpack compose animation painless. What you can create from M

Emir Demirli 12 Jan 2, 2023
FragmentTransactionExtended is a library which provide us a set of custom animations between fragments.

FragmentTransactionExtended FragmentTransactionExtended is a library which provide us a set of custom animations between fragments. FragmentTransactio

Antonio Corrales 1.1k Dec 29, 2022
Automatically manipulates the duration of animations dependent on view count. Quicksand .. the more you struggle.

QuickSand When showing a really enchanting explanatory animation to your users, but you know that after a while it'll get tedious and would stop users

Paul Blundell 385 Sep 9, 2022