Android documentation states that:
With Android 7.1 (API level 25), the Android SDK includes the Commit Content API, which provides a universal way for IMEs to send images and other rich content directly to a text editor in an app.
However, when I use the React Native's TextInput component and select a GIF from Android's keyboard, I receive the following message (see screenshot):
This text field does not support GIF insertion from the keyboard.
How can I add support for this functionality to a React Native app? Ideally I'd like a component that provides a callback to handle the URI received by commitContent().
There's a pull request that adds support from 3 months ago. I'm not clear why it isn't merged at this point...
https://github.com/facebook/react-native/pull/26088
Related
I'm making improvements to an application and I'd like to use the native Android bottom sheet, allowing users to select an option as well as the native Android sharesheet for sharing content.
I have a small userbase that is on Android 9 and an even smaller userbase that is on Android 8. I'd like to measure the impact on these users, though can not find any documentation of which Android versions support these native UI elements.
Images for reference: Bottom sheet + Share sheet
I'd like to use the native Android bottom sheet
That is not "native", insofar as it is not part of the Android SDK. You can get a bottom sheet from the Material Components for Android, which is the official implementation of some of the advanced UI elements from the site that you linked to. It works back to API Level 14 (Android 4.0).
as well as the native Android sharesheet for sharing content
ACTION_SEND works back to Android 1.0. What the visual presentation will be is up to the device manufacturer; you and I do not get a vote.
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.
I have made a website using HTML5.
However, I'm trying to make the app using the CSS, JavaScript and HTML I used for the website. Is that somehow possible?
I must use Android Studio.
Nope, you can't do that.
Android Studio is based on Java (logic) and XML (design).
XML and CSS are a little bit similar. You have paddings and margins too.
However. Prepare yourself to put work into the project.
But why do you need an app when you can also show the same contents in a website that works on way more devices? You can also use a WebView to show your website in the app.
If it must be native and you can't use a WebView, just rebuilt the design, Check out the material design guidelines, stick to them and your app will be easy to use for the users and look awesome.
Links:
https://material.google.com/ (read through the components stuff)
https://design.google.com/icons/ (all icons)
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.
I am developing an android app using the library androidsvg. Basically, I'm using an svg image as a map, each part of the map has it own group and id.
Is it possible to get the id's and add onClick listeners using only one svg img? If not, any suggestions about how to do that?
AndroidSVG is just a rendering library. It has no support for interactivity (yet - it is on the todo list).
In the meantime the simplest solution is probably just to use a WebView. Be aware though that WebView only has native support for SVG from Android 3.0 on. If you need to support earlier versions of Android, there are ways to do it with JS polyfills. See: Android webView support for svg rendering.