Skip to content

Commit

Permalink
android update
Browse files Browse the repository at this point in the history
  • Loading branch information
m1ga committed Jun 21, 2022
1 parent 307914a commit 9568bc7
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 15 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
![gif](animation.gif)


Appcelerator Titanium Android module to support smooth and scalable animations using [Airbnb Lottie](https://airbnb.design/lottie/).
Titanium module to support smooth and scalable animations using [Airbnb Lottie](https://airbnb.design/lottie/).


## Requirements

- Axway Titanium SDK 9.0.0+
- Titanium SDK 9.0.0+

## Library versions:

The Titanium modules use external libraries

|Library|Platform|Version|Build Date|
|---|---|---|---|
| [Airbnb Lottie](https://github.com/airbnb/lottie-android) | Android | 4.2.1 | 2021/11/12 |
| [Airbnb Lottie](https://github.com/airbnb/lottie-android) | Android | 5.2.0 | 2022/05/31 |
| [Airbnb Lottie](https://github.com/airbnb/lottie-ios) | iOS | 2.5.2 | 2018/12/10 |


Expand Down
Empty file removed android/assets/README
Empty file.
3 changes: 1 addition & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
repositories {
google()
jcenter()
}

dependencies {
implementation 'com.airbnb.android:lottie:4.2.1'
implementation 'com.airbnb.android:lottie:5.2.0'
}
1 change: 0 additions & 1 deletion android/documentation/index.md

This file was deleted.

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.2.0
version: 4.3.0
apiversion: 4
architectures: arm64-v8a armeabi-v7a x86 x86_64
description: ti.animation
Expand Down
2 changes: 1 addition & 1 deletion android/src/ti/animation/AnimationView.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ public class AnimationView extends TiUIView implements LottieOnCompositionLoaded

private final LottieAnimationView lottieView;
private final TiViewProxy proxy;
private final TextDelegate delegate;
private KrollFunction callbackReady = null;
private float initialDuration = 0;
private ValueAnimator va = null;
private final TextDelegate delegate;

AnimationView(TiViewProxy proxy) {
super(proxy);
Expand Down
3 changes: 0 additions & 3 deletions android/src/ti/animation/AnimationViewProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ public class AnimationViewProxy extends TiViewProxy {
static final int ANIMATION_REPEAT = 4;
@Kroll.constant
static final int ANIMATION_RUNNING = 5;
// Standard Debugging variables
private static final String LCAT = "AnimationViewProxy";
private static final boolean DBG = TiConfig.LOGD;

// Constructor
public AnimationViewProxy() {
Expand Down
10 changes: 6 additions & 4 deletions example/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ var win = Ti.UI.createWindow({
view = TiAnimation.createAnimationView({
file: '/sample_lottie.json',
loop: false,
bottom: 300,
bottom: 200,
left: 30,
height: 120,
width: 120,
borderRadius: 60,
Expand All @@ -29,6 +30,7 @@ var win = Ti.UI.createWindow({
file: '/sample_lottie.json',
loop: false,
bottom: 200,
right: 30,
height: 120,
width: 120,
borderRadius: 60,
Expand All @@ -50,7 +52,7 @@ if (isAndroid) {
});
}
view.addEventListener("ready", function() {
var dur = (isAndroid) ? view.getDuration() : (Math.floor(view.getDuration() * 1000));
var dur = (isAndroid) ? view.duration : (Math.floor(view.duration * 1000));
lbl.text = "Lottie: Duration: " + dur + "ms\n";
});
view.addEventListener("complete", function() {
Expand Down Expand Up @@ -100,7 +102,7 @@ function createButtonWithAction(title, action) {
var btn = Ti.UI.createButton({
title: title,
top: offset,
height: 28,
height: 30,
width: 200,
borderRadius: 4,
borderWidth: 1,
Expand All @@ -111,7 +113,7 @@ function createButtonWithAction(title, action) {

btn.addEventListener('click', action);

offset += 30;
offset += 32;
return btn;
}

Expand Down

0 comments on commit 9568bc7

Please sign in to comment.