I have a dedicated Android library for integrating camera features. The library provides the Fragment with all its functions. I just want to integrate this with Mainactivity in a React Native app.
I followed the link "Add fragment to interactive view"
I also looked at many tutorials . But I'm stuck in the place where we add the fragment to the Mainactivity container layout of our own React application.
Update:
React Component (JS file):
export default class MyCustomView extends Component { render() { return ( <View > { MyLayout.openBlankFragment(12345) } </View> ); } } const MyLayout = NativeModules.MyModule;
MyModule (Java code):
@ReactMethod private void openBlankFragment(final int viewId) {
view.getId () is not recognized. Need help here. If I set the identifier of the root activity representation, for example, "transaction.add (android.R.id.content, fragment);". His work is beautiful, and I can make my fragment. But I need to configure my fragment as a view on the React screen as a frame.
android android-layout react-native android-fragmentmanager react-native-android
Praveen
source share