Hi there,
I have no problem to use your package on iOS but on Android, I managed to show a native splash screen on the app load. But on the final step of your documentation, when I try to plug your package in the MainActivity.java file, in order to get control of the splash screen display duration, I have the following error :
error: cannot find symbol
protected void onCreate(Bundle savedInstanceState) {
Here is my MainActivity.java file :
package com.reactnativetest;
import com.facebook.react.ReactActivity;
import com.mehcode.reactnative.splashscreen.SplashScreen;
public class MainActivity extends ReactActivity {
/**
* Returns the name of the main component registered from JavaScript.
* This is used to schedule rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "reactNativeTest";
}
@Override
protected void onCreate(Bundle savedInstanceState) {
// Show the js-controlled splash screen
SplashScreen.show(this);
// After react is initialized; set our background color (override splash screen theme)
getReactNativeHost().getReactInstanceManager().addReactInstanceEventListener(new ReactInstanceManager.ReactInstanceEventListener() {
@Override
public void onReactContextInitialized(ReactContext context) {
// Hide the native splash screen
getWindow().getDecorView().setBackgroundColor(Color.WHITE);
}
});
super.onCreate(savedInstanceState);
}
}
Hi there, I have no problem to use your package on iOS but on Android, I managed to show a native splash screen on the app load. But on the final step of your documentation, when I try to plug your package in the MainActivity.java file, in order to get control of the splash screen display duration, I have the following error :
Here is my MainActivity.java file :
What am I doing wrong here ?