B4J Library Lottie animation

This is an attempt to bring lottie files to b4j. The .jar and .xml are there to be used. Put them in the additional libraries folder.
Call from inside b4j (LottieView) as a custom view in the designer then set the path of the lottie file (.json) which is either
-a local file must be in Objects folder (as travelling.json) or
-a URL to the online json file as 'https://lottie.host/77b574f0-9dc3-4a9b-9ef0-59733c976fc9/sM7os2UHYj.json'
*The following properties are currently available at design time:
*Lottie Path (string)
*Lottie Speed (Int)
*Autoplay (Boolean)
The other properties are still fragile.
There is an example project which includes a textFlow class taken from the forum and it can be used to add fun to the lottie display and beautify the UI.
 

Attachments

There seems to be an issue, the animation is not showing up. This is what I get in the debugger:
Code: Copy
url: bouncingpresent.json
we_getdata url: bouncingpresent.json
file:///C:/TESTSC~1/clv/B4J/Objects/bouncingpresent.html
Bridge set: com.prosoft.lottieCV.cvlottie$Bridge@1ed6aa67 member: 'b4j'

You're basically showing the Lottie javascript in a html container, right? That was how I did it previously myself. It's slower than the Android library, which interprets the json code instead of just sending it to a javascript.
 
Last edited:
There seems to be an issue, the animation is not showing up. This is what I get in the debugger:
Code: Copy
url: bouncingpresent.json
we_getdata url: bouncingpresent.json
file:///C:/TESTSC~1/clv/B4J/Objects/bouncingpresent.html
Bridge set: com.prosoft.lottieCV.cvlottie$Bridge@1ed6aa67 member: 'b4j'
What is that directory?
 
Back
Top