I am wanting to render a short piece of animation on the splash screen of my CN1 app but am struggling.
The Lottiefiles website contains a lot of good animation content, but the closest example i can find to using it is within XCode. I have the downloaded JSON file, of the animation, but am wanting to know if anyone has figured a way of incorporating into a CN1 Java app?
I can see that developers have used in Java, but CN1 wouldn't allow the LottieAnimationView component on it's layout manager i would guess.
https://steemit.com/utopian-io/#fahrulhidayat/beautiful-animation-for-android-application-using-lottie-library
Any pointers appreciated. Thanks
The "right way" would probably be to wrap the native implementations for the various OS's in a cn1lib so you can use lottie in a cross platform way. There's a long tutorial about wrapping native code in the developer guide and Steve did a 3 part video series on the subject a few years back: https://www.codenameone.com/blog/integrating-3rd-party-native-sdks-part-3.html
It's mostly mechanical so it shouldn't be too hard. If you want to take a shortcut you can probably use the web version of the API in a BrowserComponent and call it a day.
Related
I need a piece of advice. I want to create a React web application with React using typescript and I want when clicking a button to show a new page with a scene of a town. What is the best way to make it possible, I mean to integrate the scene in the React Project. I saw recently that I can use ReactVR to create a 3D scene. Is this the best way to do this or there is another way to do what I want. Please give me a piece of advice.
Thank you for reading this and for your interest.
I suggest to use a mixt between react-babylone and a simple canvas.
react-babylone support react hooks you will not found a problem with react versions .
There are a good community and you can find answers quickly in case of difficulty.
https://github.com/brianzinn/react-babylonjs
I actually recommend we go with Google's Model Viewer library as it is the easiest if you want to 3d viewing assets. there is some other's Three.js and Babylon.js as well
https://opensea.io/assets/0x495f947276749ce646f68ac8c248420045cb7b5e/105652905984981711355387048174102533489553866874432653063576599426835396165633
LayoutAnimation is a part of React Native that automatically animates components when the view is rendered.
The official documentation is here:
https://reactnative.dev/docs/layoutanimation
However, the examples in the docs do not work. Objects in the examples that are supposed to animate just jump from the starting position to the end position.
Here is an example of one of the Snacks in the documentation that does not appear to animate:
https://snack.expo.io/91MUQd5IH
This would lead one to the conclusion that this API is just not supported or no longer functional.
Is it the case that Layout Animation just does not work? Or if it does work under some circumstances, please share a link containing a working Snack / Gist with an extremely simple but working LayoutAnimation example.
UPDATE: LayoutAnimation possibly does not support web. Does anyone have any knowledge of this or who can refer the reader to an explanation in the docs?
LayoutAnimation is currently not supported properly in react-native-web. You can see that here: https://github.com/necolas/react-native-web#modules and here https://github.com/necolas/react-native-web/issues/1613, https://github.com/necolas/react-native-web/issues/1056. It doesn't seem to be a priority for the project at the moment so I wouldn't count on it being implemented.
On iOS/Android it's a different story. If we look here: https://reactnative.dev/docs/layoutanimation/ you can actually see this working properly by pressing play and selecting iOS for example.
On Android we have support as well but it might not work/crash. If you look over the issues open for react-native, you will see a lot of them mention issues with LayoutAnimation and Android. E.g. it crashes under certain conditions on Android: https://github.com/facebook/react-native/issues/27552 and https://github.com/facebook/react-native/issues/29919.
I don't recommend using LayoutAnimation, especially on Android, as it is highly experimental and might crash on some devices without warning.
If you want to try some more interesting animations with better performance, I recommend you try using the Animated API from ReactNative or the newer react-native-reanimated which is faster, more modern but still in alpha (I'm talking about the current, v2, version).
By my test the given link in the question post works properly:
Also, I test it on my friend's iPhone and it's worked properly too. But many of React Native features don't work properly on Web export. For example animations on RNW (React Native Web) works on Android/iOS exports but not on Web exports.
For such web situations, you should decouple the web component and make a separate file then write the desired animation on it.
In my new project with React, I need to implement an environment for designing doors and windows so that the user can design frames through the browser (like the two figures below) and then save it on the server-side. Then I have to fetch and display it in the mobile application that is implemented with React Native. I searched for it but couldn't find anything special that would work. I even found "konvajs" that has done some work in this area but it doesn't work for me and I think I need to develop this feature myself. If you know of any tools or technologies for this, please let me know. If not, what do you think I can do about it?
picture-1
picture-2
I would like to be able to render user interfaces for cross-platform audio plug-ins (VST, audiounit) on desktop machines using HTML UI, in a similar approach to this project https://github.com/russellmcc/audiounitjs
Unfortunately native web views are significantly different [and particularly limited on windows].
I'm investigating whether I can use libchromiumcontent from the electron project to do this, but I can't find a basic tutorial that looks appropriate e.g. a basic c++ app rendering a UI using HTML. I'm not even sure if that's gonna be possible. Perhaps I have to wait for mozilla's servo? because I am developing audio plug-ins, the plug-in host controls the main application loop. Does this means I cannot use libchromiumcontent?
thanks
First, my question might sound like a duplicate, but I have been going through a lot of questions on this forum and haven't found the answer to what I am looking for.
I have an existing web application built using Java, struts2 and jsps. I want the web site to be mobile - friendly. I am not looking at developing native apps right now. I want the mobile-site to have a native-app like appearance. So if a user goes to the browser on a mobile and accesses my site it should have that native look and feel. So I looked at Sencha touch 2 to begin with. I am new to Mobile development and would appreciate help in understanding how to go about evaluating Sencha touch 2 as a viable option. I see from examples that in ST the UI is mostly built using ExtJs javascript.
My questions are the following
Is there a way to port my existing jsps and html to the mobile view , without building them from scratch?
Since the css for the site is currently built for 'screen' media, this will obviously have to be worked out , but does Sencha Touch
provide any functionality of using an existing css and customising it
for a mobile device?
Appreciate your help,
Unfortunately, the answer to your first question is no.
Java/JSP and Javascript are totally different in essence. No convention could be made to convert between these two.
For the second one, SASS/SCSS might be the things you're looking for: http://sass-lang.com/. It's because Sencha Touch components' CSS properties are build through SCSS files. You can take advantage of these. For further ideas, see: http://www.sencha.com/blog/an-introduction-to-theming-sencha-touch