v2.5.1
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c7d30f6..c5f1ddf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,17 @@
+# 2.5.1
+### Features and Improvements
+* Removed framerate restriction introduced in 2.5.0 that caused Lottie to attempt to render at the After Effects framerate. This caused animations to appear unexpectedly janky in most cases.
+### Bugs Fixed
+* Many minor bug fixes around setting min/max frames
+* Removed @RestrictTo on LottieValueCallback
+* Improved thread safety of animation listeners
+* Fixed looping when the animation speed is reversed
+
+
# 2.5.0
+### Features and Improvements
* Added the ability to dynamically change properties at runtime. See [docs](http://airbnb.io/lottie/android/dynamic.html) for more info. This feature removed the existing APIs for
-changing the color dynamically with a color filter. Refer to the docs for migration info from
+changing the color dynamically with a color filter. Refer to the docs for migration info from
existing ColorFilter APIs.
* Added a setRepeatMode and setRepeatCount (Thanks Fabio Nuno!).
* Completely overhauled json deserialization. Deserializing a composition takes half as long and
diff --git a/LottieSample/build.gradle b/LottieSample/build.gradle
index ea353db..3fa402e 100644
--- a/LottieSample/build.gradle
+++ b/LottieSample/build.gradle
@@ -13,8 +13,8 @@
applicationId "com.airbnb.lottie"
minSdkVersion 16
targetSdkVersion 27
- versionCode 34
- versionName "2.5.0"
+ versionCode 35
+ versionName "2.5.1"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
diff --git a/README.md b/README.md
index 2632199..d085f2a 100644
--- a/README.md
+++ b/README.md
@@ -35,6 +35,6 @@
```groovy
dependencies {
- compile 'com.airbnb.android:lottie:2.5.0'
+ compile 'com.airbnb.android:lottie:2.5.1'
}
```
diff --git a/gradle.properties b/gradle.properties
index 3f1b787..b8cbb11 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -17,7 +17,7 @@
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
-VERSION_NAME=2.5.0
+VERSION_NAME=2.5.1
GROUP=com.airbnb.android
POM_DESCRIPTION=Lottie is an animation library that renders Adobe After Effects animations natively in realtime.
diff --git a/lottie/build.gradle b/lottie/build.gradle
index 7fdd5a4..93a74c1 100644
--- a/lottie/build.gradle
+++ b/lottie/build.gradle
@@ -10,7 +10,7 @@
minSdkVersion 16
targetSdkVersion 27
versionCode 100
- versionName "2.5.0"
+ versionName "2.5.1"
}
lintOptions {
abortOnError true
diff --git a/lottie/src/main/java/com/airbnb/lottie/LottieAnimationView.java b/lottie/src/main/java/com/airbnb/lottie/LottieAnimationView.java
index a4328bb..2bc075e 100644
--- a/lottie/src/main/java/com/airbnb/lottie/LottieAnimationView.java
+++ b/lottie/src/main/java/com/airbnb/lottie/LottieAnimationView.java
@@ -703,6 +703,12 @@
*
* If your images are located in src/main/assets/airbnb_loader/ then call
* `setImageAssetsFolder("airbnb_loader/");`.
+ *
+ * Be wary if you are using many images, however. Lottie is designed to work with vector shapes
+ * from After Effects. If your images look like they could be represented with vector shapes,
+ * see if it is possible to convert them to shape layers and re-export your animation. Check
+ * the documentation at http://airbnb.io/lottie for more information about importing shapes from
+ * Sketch or Illustrator to avoid this.
*/
public void setImageAssetsFolder(String imageAssetsFolder) {
lottieDrawable.setImagesAssetsFolder(imageAssetsFolder);
@@ -728,6 +734,12 @@
* Use this if you can't bundle images with your app. This may be useful if you download the
* animations from the network or have the images saved to an SD Card. In that case, Lottie
* will defer the loading of the bitmap to this delegate.
+ *
+ * Be wary if you are using many images, however. Lottie is designed to work with vector shapes
+ * from After Effects. If your images look like they could be represented with vector shapes,
+ * see if it is possible to convert them to shape layers and re-export your animation. Check
+ * the documentation at http://airbnb.io/lottie for more information about importing shapes from
+ * Sketch or Illustrator to avoid this.
*/
public void setImageAssetDelegate(ImageAssetDelegate assetDelegate) {
lottieDrawable.setImageAssetDelegate(assetDelegate);
@@ -793,6 +805,9 @@
* animation down then rendering it in a larger ImageView and letting ImageView scale it back up
* with a scaleType such as centerInside will yield better performance with little perceivable
* quality loss.
+ *
+ * You can also use a fixed view width/height in conjunction with the normal ImageView
+ * scaleTypes centerCrop and centerInside.
*/
public void setScale(float scale) {
lottieDrawable.setScale(scale);
diff --git a/lottie/src/main/java/com/airbnb/lottie/LottieDrawable.java b/lottie/src/main/java/com/airbnb/lottie/LottieDrawable.java
index e336506..fc33535 100644
--- a/lottie/src/main/java/com/airbnb/lottie/LottieDrawable.java
+++ b/lottie/src/main/java/com/airbnb/lottie/LottieDrawable.java
@@ -157,6 +157,12 @@
* If you use LottieDrawable directly, you MUST call {@link #recycleBitmaps()} when you
* are done. Calling {@link #recycleBitmaps()} doesn't have to be final and {@link LottieDrawable}
* will recreate the bitmaps if needed but they will leak if you don't recycle them.
+ *
+ * Be wary if you are using many images, however. Lottie is designed to work with vector shapes
+ * from After Effects. If your images look like they could be represented with vector shapes,
+ * see if it is possible to convert them to shape layers and re-export your animation. Check
+ * the documentation at http://airbnb.io/lottie for more information about importing shapes from
+ * Sketch or Illustrator to avoid this.
*/
public void setImagesAssetsFolder(@Nullable String imageAssetsFolder) {
this.imageAssetsFolder = imageAssetsFolder;
@@ -604,6 +610,9 @@
* animation down then rendering it in a larger ImageView and letting ImageView scale it back up
* with a scaleType such as centerInside will yield better performance with little perceivable
* quality loss.
+ *
+ * You can also use a fixed view width/height in conjunction with the normal ImageView
+ * scaleTypes centerCrop and centerInside.
*/
public void setScale(float scale) {
this.scale = scale;
@@ -614,6 +623,12 @@
* Use this if you can't bundle images with your app. This may be useful if you download the
* animations from the network or have the images saved to an SD Card. In that case, Lottie
* will defer the loading of the bitmap to this delegate.
+ *
+ * Be wary if you are using many images, however. Lottie is designed to work with vector shapes
+ * from After Effects. If your images look like they could be represented with vector shapes,
+ * see if it is possible to convert them to shape layers and re-export your animation. Check
+ * the documentation at http://airbnb.io/lottie for more information about importing shapes from
+ * Sketch or Illustrator to avoid this.
*/
public void setImageAssetDelegate(
@SuppressWarnings("NullableProblems") ImageAssetDelegate assetDelegate) {