react-native-splash-screen icon indicating copy to clipboard operation
react-native-splash-screen copied to clipboard

Could you add the way to make fullscreen on Android?

Open Javs-21 opened this issue 1 year ago • 0 comments

I am watching the code to show the splash but i didn't see how to enable or show in fullscreen my splash

I thing we can get this feature modify this block of code

public static void show(final Activity activity, final int themeResId, final boolean fullScreen) {
        if (activity == null) return;
        mActivity = new WeakReference<Activity>(activity);
        activity.runOnUiThread(new Runnable() {
            @Override
            public void run() {
                if (!activity.isFinishing()) {
                    mSplashDialog = new Dialog(activity, themeResId);
                    mSplashDialog.setContentView(R.layout.launch_screen);
                    mSplashDialog.setCancelable(false);
                    if (fullScreen) {
                        setActivityAndroidP(mSplashDialog);
                    }
                    if (!mSplashDialog.isShowing()) {
                        mSplashDialog.show();
                    }
                }
            }
        });

adding this line dialog.getWindow().setFlags(LayoutParams.FLAG_FULLSCREEN, LayoutParams.FLAG_FULLSCREEN); or this one dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);

Javs-21 avatar Jun 07 '24 00:06 Javs-21