Nov 15, 2024 Replies: 3 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 LottieView.zip LottieView.zip 14 KB · Views: 383 b4j_lottie_Example.zip b4j_lottie_Example.zip 3.2 KB · Views: 370 Click to expand...
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.
wimpie3 Well-Known Member Licensed User Longtime User Dec 16, 2024 #2 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: Dec 16, 2024
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.
J jkhazraji Active Member Licensed User Longtime User Dec 16, 2024 #3 wimpie3 said: 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' Click to expand... What is that directory?
wimpie3 said: 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' Click to expand... What is that directory?
wimpie3 Well-Known Member Licensed User Longtime User Dec 16, 2024 #4 That's the directory where my code is running.