1>은을 사용을 통해 원하는 모듈 반응 - 네이티브 - 스마트 - 스플래시 스크린 귀하의 proje에 설치 파일에서 CT 2> 네이티브 응용 프로그램을 반응에 방문 페이지에서
import com.reactnativecomponent.splashscreen.RCTSplashScreenPackage;
replace the getPackages() method with the following
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new VectorIconsPackage(),
new MapsPackage(),
new RCTSplashScreenPackage()
);
}
이제 MainApplication.java 파일에
import com.reactnativecomponent.splashscreen.RCTSplashScreen;
import android.os.Bundle;
import android.content.Intent;
in the onCreate method delete the method and copy the code below
@Override
protected void onCreate(Bundle savedInstanceState) {
RCTSplashScreen.openSplashScreen(this);
super.onCreate(savedInstanceState);
}
같은 코드를 업데이트 MainActivity.java
import SplashScreen from 'react-native-smart-splash-screen'
in the lifecycle method componentWillMount() add the following as:
componentDidMount(){
SplashScreen.close(SplashScreen.animationType.scale, 2000, 800)
}
문제가있는 경우이 repo를 방문하십시오.
https://github.com/UjjwalNepal/Dental
https://github.com/react-native-component/react-native-smart-splash-screen
뿐만 아니라 Gradle을 설정에서 위의 링크에 언급 된 종속성을 추가하고 난이 작정
덕분에 위의 링크에서 언급 한 바와 같이/응용 프로그램/build.gradle 안드로이드에 종속성을 추가 이미이 패키지를 사용했지만 패키지 또는 JavaScript 코드없이 RN android 용 스플래시 화면을 만드는 방법에 대해 궁금하십니까? –
자바로 잘 알고 있다면 안드로이드 네이티브 자체로 작성하기 쉽습니다. RN과 함께 이것에 대해 알지는 못하지만 위의 제안 사항은 잘 작동합니다. 스플래시 화면 https://play.google. co.kr/store/apps/details? id = com.loksewaquiz –
감사합니다. 위 내용을 설명하고 감사합니다. 많은 답변을드립니다. –