Bump lottie to 1.5.3
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a33f357..bbabbaf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,15 @@
+# 1.5.3
+#### Features and improvements
+* Added an image asset delegate so you can provide your own bitmaps from and sd card, for example.
+* Added an attr for setting progress.
+* Improved the performance of very large compositions by scaling them down to the screen size.
+* Separate APIs for play/cancel with or without setting progress.
+
+#### Bugs Fixed
+* Several issues that could cause graphical corruption in masks or mattes.
+* LottieAnimationView checks whether it's current drawable is LottieDrawable for some calls.
+
+
# 1.5.2
#### Features and improvements
* Significantly improved memory usage when using masks or mattes. No more bitmaps!
diff --git a/LottieSample/build.gradle b/LottieSample/build.gradle
index 1017a9e..5d844b6 100644
--- a/LottieSample/build.gradle
+++ b/LottieSample/build.gradle
@@ -8,8 +8,8 @@
applicationId "com.airbnb.lottie"
minSdkVersion 16
targetSdkVersion 25
- versionCode 5
- versionName "1.5.2"
+ versionCode 6
+ versionName "1.5.3"
testInstrumentationRunner "com.airbnb.lottie.TestRunner"
}
buildTypes {
diff --git a/LottieSample/src/main/java/com/airbnb/lottie/samples/AnimationFragment.java b/LottieSample/src/main/java/com/airbnb/lottie/samples/AnimationFragment.java
index 1087bfc..acb6172 100644
--- a/LottieSample/src/main/java/com/airbnb/lottie/samples/AnimationFragment.java
+++ b/LottieSample/src/main/java/com/airbnb/lottie/samples/AnimationFragment.java
@@ -6,8 +6,6 @@
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
@@ -28,10 +26,8 @@
import android.widget.TextView;
import android.widget.Toast;
-import com.airbnb.lottie.ImageAssetDelegate;
import com.airbnb.lottie.LottieAnimationView;
import com.airbnb.lottie.LottieComposition;
-import com.airbnb.lottie.LottieImageAsset;
import com.airbnb.lottie.OnCompositionLoadedListener;
import org.json.JSONException;
@@ -154,23 +150,7 @@
switch (requestCode) {
case RC_ASSET:
final String assetName = data.getStringExtra(EXTRA_ANIMATION_NAME);
- // animationView.setImageAssetsFolder(assetFolders.get(assetName));
- animationView.setImageAssetDelegate(new ImageAssetDelegate() {
- @Override public Bitmap fetchBitmap(LottieImageAsset asset) {
- InputStream is;
- try {
- is = getContext().getAssets().open("Images/WeAccept/" + asset.getFileName());
- } catch (IOException e) {
- Log.w("Gabe", "Unable to open asset.", e);
- return null;
- }
- BitmapFactory.Options opts = new BitmapFactory.Options();
- opts.inScaled = true;
- opts.inDensity = 160;
- Bitmap bitmap = BitmapFactory.decodeStream(is, null, opts);
- return bitmap;
- }
- });
+ animationView.setImageAssetsFolder(assetFolders.get(assetName));
LottieComposition.Factory.fromAssetFileName(getContext(), assetName,
new OnCompositionLoadedListener() {
@Override
diff --git a/README.md b/README.md
index 5702592..bf972fc 100644
--- a/README.md
+++ b/README.md
@@ -43,7 +43,7 @@
```groovy
dependencies {
- compile 'com.airbnb.android:lottie:1.5.2'
+ compile 'com.airbnb.android:lottie:1.5.3'
}
```
@@ -126,6 +126,16 @@
bodymovin export are in that folder with their names unchanged (should be img_#).
If you use `LottieDrawable` directly, you must call `recycleBitmaps` when you are done with it.
+If you need to provide your own bitmaps if you downloaded them from the network or something, you
+ can provide a delegate to do that:
+ ```java
+animationView.setImageAssetDelegate(new ImageAssetDelegate() {
+ @Override public Bitmap fetchBitmap(LottieImageAsset asset) {
+ getBitmap(asset);
+ }
+ });
+```
+
## Supported After Effects Features
### Pre-composition
diff --git a/gradle.properties b/gradle.properties
index 69354bc..b3b522f 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=1.5.2
+VERSION_NAME=1.5.3
GROUP=com.airbnb.android
POM_DESCRIPTION=Lottie is an animation library that renders Adobe After Effects animations natively in realtime.