React native modal blur/vibrancy on iOS and Android? - android

I'm trying to build a modal that looks somewhat like this using React Native for iOS and Android. Are there any libraries that do blurred/vibrancy overlays? I had a look at the react-native-blur, however unfortunately this is only for iOS. React-native-overlay also has some options for such views, however it also appears to be iOS only.
Is there a library that supports both platforms, or is there a way to use a JS library such as vibrancy.js that can be used with React?

Currently react-native-blur supports blur for Android as well. However a little bit of setup is required. Check out the docs here:
https://github.com/react-native-community/react-native-blur.
The library also offers the ability to create vibrancy views. Although, at the present (v 3.2.2), vibrancy will only work fo iOS.

Related

Setting up a native UISplitViewController in React Native

I'm developing a React Native application and I would like to use a UISplitViewController interface. This would allow the correct format for iPad and iPhone as well as split view and multitasking.
I haven't been able to find any information on how to setup a UISplitViewController controller in React Native. I wonder if anyone could help me with advice on how I can setup a UISplitViewController using React Native for iOS. I am a iOS developer by background in swift so it would be amazing to learn how to do this in React Native.
Also I wonder if you could provide me some help on how to then do the same layout (UISplitViewController) type on the Android side for the Raect Native App.
Thank you for your help on this one.
There is no included bridge to Split View Controller in React Native. However, you can write your own Native Module (see https://facebook.github.io/react-native/docs/native-modules-ios.html) — once you set it up it’s typically just a few lines of code for each method call you want to enable. You may wish to review the source code for https://github.com/wix/react-native-navigation in order to see how they implement some of the same functions on a UINavigationController.
Android doesn’t have an equivalent to iOS/tvOS’s split view controller, so you’ll either need to roll your own on the Java side of things, or just bridge to regular Activity/Fragments in Android.
This bridge is probably fine for a split view controller. But if you really want good tablet support for your app, including split screen multitasking, drag and drop, PIP video, stylus support, etc., you should probably just write it fully native instead of using React Native since the tablet support isn’t really there.

Use react native to create a iOS framework and Android library (not app) from common code base

Has anyone had any success using react native to create both iOS and Android apps that can be used as libraries/sub-projects in other iOS and Android native projects that were created without react native? My goal is to create new functionality for an existing app that has both a iOS and Android codebase that was developed without react native.
As a simple example, lets image that I need to create a series of screens and logic to allow a user to 'create a new account'. Ideally I would like to create the new functionality (controller, views, api-client, etc.) using react native and then export it as a self contained iOS and Android app. In addition to being able to run these apps on their own, I would also like to be able to include them in other native iOS/Android projects as sub-projects. The native iOS project would then create a new storyboard/ViewController/segue(s) and link the main-view of the react native iOS App to it.
I know on iOS/xcode I can add a sub-project by drag-and-dropping an .xcodepro into another one. If I did this with a .xcodepro that was created with react native, how would I go about linking the top level view to the existing non-react native iOS project? Is there a similar process on the Android side to achieve the same functionality?
I would like to explore React Native as well. We have similar needs as you - to develop a common library/framework for iOS and Android. Our solution was to code the library in C++ and use it in XCode on iOS and through a JNI (Java Native Interface) converter on Android as well. The JNI is a pain as not everything translates 1 to 1. I researched using Ruby/RubyMotion but that also has a JNI conversion step. There are other languages that do not require a JNI conversion - but from my last read these are also eperimental. Trying all of these will require effort and results are not guaranteed. Assuming aside from the shared library you still want Native for the rest of the App (UI etc), this will require developers with a combination of Swift, React, and Java (which could get expensive) The approach that makes most sense would be to use Swift for the iOS framework and Kotlin for the Android library and use the same style (functional/react-swift/react-java style code) That way, while the libraries are still different, they are coded in the same style so development/maintenance effort on one can be quickly copied/applied to the other.

Using FabricJS With React-Native

I have an application which is built on a ReactJS and uses FabricJS extensively. We plan to reuse a lot of code and build mobile apps using React-Native but I am not sure how we can integrate the FabricJS component into it.
The app is something like https://www.my-wallsticker.de/wandtattoo-selber-gestalten/
I have found and used https://www.npmjs.com/package/react-fabricjs but nothing available for React-Native.
What could be the solution?
You would have to use a WebView with canvas (or something like this library: https://github.com/iddan/react-native-canvas) in order to be able to render anything with FabricJS.

Does Android Studio supports AngularJS for Android UI design?

I have a question about Android Studio: Does AS supports AngularJS code while designing XML files, e.g. for small animations or effects?
SUMMARY : NO
There is no way you can write Angular JS code while developing Android Native app. You can use Angular in a WebView (using js/html so), that's all.
AngularJS is a completely different technology than what is used in native Android apps. Native Android apps use Java and/or C for their code, which is compiled when you build the app. AngularJS is a framework for web development, running specifically on Javascript (a completely different technology than Java).
You can build apps without using native Java or C code, but there are tradeoffs. As noted in other answers, you can display webpage views as apps (using technologies like Cordova]), or use frameworks like React Native to write code in Javascript that then gets compiled to a native app. You could use AngluarJS in the webview instance, since it just displays a webpage, however not in something like React Native. I highly encourage you to check both of these (and other options) out, but keep in mind that they have their own limitations and tradeoffs – no one way is the "right" way to build an app.
In summary: No, AngularJS is a web technology, not a native app technology.
new answer = Yes... Sort of, you can do it with:
https://www.nativescript.org/
It translates javascript, angular and typescript code into native components!
Apparantly it's possible to use nativescript in Android Studio with:
https://docs.nativescript.org/runtimes/android/getting-started/hello-world
Android Does not support AngularJs. but still if you want to use you can use it in webview.

Is it possible to compile a Xamarin project as a library for iOS and Android?

I need to create an API library for Android and iOS. I have experience working with Android projects, but zero experties in iOS. I was wondering if I could create a Project library in Xamarin that compiles as a JAR for Android and as an... I-don't-know-which-type for iOS.
No, that isn't possible. Depending on what you are trying to accomplish there may be alternatives. If you are trying to make a library that can be used by others you could make it a Xamarin component - there is a component store you could put it on if you want it to be generally available, otherwise you can use any normal means of source or object distribution.
If you need to interact with a native app/library then you could make the C# code the "owner" of it and have it call into the native code. This works for both IOs and Android (and is used to work with e.g the play services from google).
No, it is unfortunately not possible to do that.
It seems to me that what you need is a Portable Class Library also known as PCL. It allows you to create a project which can be referenced by all Xamarin supported platforms (such as iOs and Android). There are obviously limitations to the approach like not being able to reference platform specific libraries but in your case (of writing an API) it should suffice.
You can read more in this link
Good Luck!

Categories

Resources