Skip to content

Commit

Permalink
android lottie: update and bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
m1ga committed Jun 23, 2024
1 parent d3afb04 commit 6278a92
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies {
implementation "androidx.startup:startup-runtime:1.1.1"

// https://github.com/airbnb/lottie-android
implementation 'com.airbnb.android:lottie:6.3.0'
implementation 'com.airbnb.android:lottie:6.4.0'

// https://github.com/rive-app/rive-android
implementation 'app.rive:rive-android:5.1.5'
Expand Down
2 changes: 1 addition & 1 deletion android/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 4.6.0
version: 4.7.0
apiversion: 4
architectures: arm64-v8a armeabi-v7a x86 x86_64
description: ti.animation
Expand Down
9 changes: 7 additions & 2 deletions android/src/ti/animation/AnimationView.java
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,13 @@ private void setScaleMode(String smode) {
private void parseJson(String json) {
try {
JSONObject jsonObject = new JSONObject(json);
proxy.setProperty("width", jsonObject.optInt("w", 0));
proxy.setProperty("height", jsonObject.optInt("h", 0));
if (!proxy.hasPropertyAndNotNull("width")) {
proxy.setProperty("width", jsonObject.optInt("w", 0));
}
if (!proxy.hasPropertyAndNotNull("height")) {
proxy.setProperty("height", jsonObject.optInt("h", 0));
}

} catch (Exception e) {
Log.e(LCAT, "Couldn't read width/height");
}
Expand Down

0 comments on commit 6278a92

Please sign in to comment.