Questions tagged [react-native-native-ui-component]

19 questions
8
votes
2 answers

How to implement a React Native UI component method in Android

It's clear to me that for react-native native modules we can use the @ReactMethod to export a method and call it from JSX, but how do we do the same thing in react-native native UI components? In the documentation I only see @ReactProp being…
5
votes
2 answers

Native UI Component throws Invariant Violation: tried to register two views with the same name FridgeCameraView

Trying to learn React Native custom Native UI Components. // FridgeCameraViewManager.swift import UIKit @objc(FridgeCameraViewManager) class FridgeCameraViewManager: RCTViewManager { override func view() -> UIView! { let label = UILabel() …
5
votes
1 answer

Native UI Components - Refresh when Android views update

We're trying to implement a Native UI Component that wraps an Android components that fetches data and displays it using our existing rendering framework (using an AdapterView). We don't know what the data will be in advance, so the height and…
dmon
  • 30,048
  • 8
  • 87
  • 96
4
votes
1 answer

Bridging Android CameraX into React Native

I am creating a native UI component for CameraX to React Native. First tried triggering in activity to check and worked fine. Looking out to extract as UI View for React Native. Its just showing a blank white screen. camera preview is not showing…
4
votes
1 answer

React Native - RCT_EXPORT_VIEW_PROPERTY is nil in view init method

I am trying to create a Native UI component on my RN project on iOS. I pass a props uri to my Native component. But when I try to use it in the init method of my view, it is nil. // myNativeComponentManager.m @implementation…
3
votes
0 answers

React Native: How to calculate custom native UITextView height dynamically

I am working on an existing iOS-App in which I have added new features with React-Native. Works great so far. Now I have to use an already developed custom native Swift UITextView subclass. The text is getting fetched from the API. So the size of…
Thomas G.
  • 1,003
  • 12
  • 27
2
votes
1 answer

React-Native Native UI component doen't resize (Android)

I have issues with React Native respecting the height of an Android Native UI Component. I have created a very simple use-case to demonstrate the issue. React Native version = 0.61.5. Android, React Native ViewManager: public class…
Ben Groot
  • 5,040
  • 3
  • 40
  • 47
2
votes
0 answers

How to emit item select event from JAVA native UI component to react native

I am using Android's AutoCompleteTextview via Native UI Component in my react native app. I am able to pass the text change events to react native app, but unable to pass on item click event to react native. Here is my JAVA code …
1
vote
1 answer

How to fix java.lang.string cannot be cast to com.facebook.react.bridge.readableArray?

I was creating a native Image component in the Android and here is some code that I used. ViewManager.java // setting the source of the ImageView @ReactProp(name = "src") public void setSrc(ReactImageView view, @Nullable ReadableArray sources) { …
1
vote
0 answers

Return data in native UI component (React Native)

I have created a native UI component for React Native on Android side. I know how to add properties to the view. But how should I send data from my view to javascript side? public class MyView extends FrameLayout { public MyView(Context…
Payam Roozbahani
  • 1,225
  • 15
  • 27
1
vote
1 answer

How to manipulate properties of React Native - Native UI Component?

I am working on a React Native app. The app consists of both web-based views and native ui views (components). While the rendering of the web-based views and also the native ui views works, I am not able to manipulate properties of the native ui…
1
vote
1 answer

Event when all the initial props of a react-native Native UI Component have successfully loaded?

I'm building a react-native native UI component: - (UIView *)view { return [[MyComponent alloc] initWithBridge:self.bridge]; } and I'm exposing props like this: RCT_EXPORT_VIEW_PROPERTY(prop1, NSDictionary) RCT_EXPORT_VIEW_PROPERTY(prop2,…
0
votes
0 answers

Style React Native Android Native module using Java

I'm working on Android native module, and I'm trying to add padding to the view from Java code, what is happening is that the child view is not pushed when I'm using setPadding method, any idea why? public class TestView extends ReactViewGroup { …
0
votes
0 answers

Calling Native Ui from React component

hi all i am pretty much new to Native UI component in react-native hence for start i created a button on native side in android and exposed it .i am able to import that button in my component but i have been unsuccessful to map button native event…
0
votes
2 answers

My react-native TextInput disappear when I start typing

I have screen named EditScreen. It has text input that takes the height of the device. The problem is that when I start typing the text goes above and disappear. Any solutions, please. here is my Text Input component
1
2