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

this setup is for java now the android file is converted to kotlin, can anyone share the setup for kotlin

Open nawazokz opened this issue 1 year ago • 12 comments

Run react-native info in your project and share the content.

What react-native-splash-screen version are you using?

What platform does your issue occur on? (Android/iOS/Both)

Describe your issue as precisely as possible :

  1. Steps to reproduce the issue or to explain in which case you get the issue
  2. Interesting logs

Join a screenshot or video of the problem on the simulator or device?

Show us the code you are using?

nawazokz avatar Feb 23 '24 07:02 nawazokz

@nawazokz I recommend you to use BootSplash it currently supports the new react native architecture.

soadtechdev avatar Feb 25 '24 12:02 soadtechdev

package com.turtlebuddy import android.os.Bundle; import com.facebook.react.ReactActivity import com.facebook.react.ReactActivityDelegate import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled import com.facebook.react.defaults.DefaultReactActivityDelegate // react-native-splash-screen >= 0.3.1

import org.devio.rn.splashscreen.SplashScreen;

class MainActivity : ReactActivity() {

/**

  • Returns the name of the main component registered from JavaScript. This is used to schedule
  • rendering of the component. */ override fun onCreate(savedInstanceState: Bundle?) { SplashScreen.show(this);
    super.onCreate(null) }

override fun getMainComponentName(): String = "turtleBuddy"

/**

  • Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
  • which allows you to enable New Architecture with a single boolean flags [fabricEnabled] */ override fun createReactActivityDelegate(): ReactActivityDelegate = DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled) }

AkilUnik avatar Feb 27 '24 06:02 AkilUnik

Facing the Same Issue, the Splash Screen [react-native-splash-screen] is not Working, Just because of kotlin Issue,

muhammadalizkhan avatar Mar 24 '24 00:03 muhammadalizkhan

Check the following comment, it solved the issue and the example provided for Kotlin

https://github.com/crazycodeboy/react-native-splash-screen/issues/638#issuecomment-2020896542

bkvaiude avatar Mar 26 '24 16:03 bkvaiude

Does anyone have an idea how to solve it? I need this fix

Netovitu avatar Mar 28 '24 00:03 Netovitu

https://github.com/crazycodeboy/react-native-splash-screen/issues/639#issuecomment-1965855871 try this solution it work for me

nawazokz avatar Mar 28 '24 07:03 nawazokz

https://github.com/crazycodeboy/react-native-splash-screen/issues/639#issuecomment-1965855871 try this solution it work for me just paste these line of code under class MainActivity : ReactActivity() the line is override fun onCreate(savedInstanceState: Bundle?) { SplashScreen.show(this); // add this super.onCreate(null) }

nawazokz avatar Mar 28 '24 07:03 nawazokz

#639 (comment) try this solution it work for me

i build success but it crash when open app on android 8

huyvu23 avatar Apr 13 '24 03:04 huyvu23

The readme docs needs to be updated please

Cheizr avatar Jul 12 '24 06:07 Cheizr