K
K
KnightForce2017-08-24 17:03:01
React
KnightForce, 2017-08-24 17:03:01

React Native. How to remove the white screen after. splashscreen?

In Android, how to remove the white screen after Splash Screen, without third-party libraries?
Now my Splash Screen is another Activity:

import com.facebook.react.ReactActivity;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class SplashActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        Intent intent = new Intent(this, MainActivity.class);
        startActivity(intent);
        finish();
    }
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg Gamega, 2017-08-24
@gadfi

call finish before startActivity and in general why use a new activity for this?
use update theme
https://www.bignerdranch.com/blog/splash-screens-t...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question