I creating an android native module from an existing Java library. This library, make a GLSurfaceView
setEGLContextClientVersion(2);
setRenderer(new GLSurfaceView.Renderer() {
@Override
public void onSurfaceCreated(GL10 gl, EGLConfig config) {
//Do things
}
@Override
public void onSurfaceChanged(GL10 gl, int width, int height) {
//Do things
}
@Override
public void onDrawFrame(GL10 gl) {
{
//Do things
}
}
});
into an android layout
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.___.FpvActivity">
<com.____.GLSurfaceView
android:layout_width="match_parent"
android:layout_height="match_parent">
</com.____.GLSurfaceView>
</RelativeLayout>
and set it by
setContentView(R.layout.activity_fpv);
What I want to do, is a react native module ( only android ) to include this view into a React Native Component. This View must be in the background of other RN elements.
What I'd tried to do is to inflate this layout by a ViewManager by
View.inflate(getApplicationContext(), R.layout.activity_fpv, null);
but without solution.
I can only see the original layout without my element ( put over in .js file)
Some ideas? This is my first experience with an RN Native module with layout interaction and I don't have much experience in Android/Java language