1.0.0-1 • Published 5 years ago

my-rn-splash v1.0.0-1

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

Cái Splash Screen Lúc mở ứng dụng

Installation

Thêm Vào package.json
"my-rn-splash": "git+https://gitlab.com/react-native-my-libs/my-rn-splash.git",

Chạy lệnh sau

npm install

Sử dụng

 private _renderWithSplashView() {
        return (
            <View style={{flex: 1}}>
                <VContainerLoad loadDataAsync={this.loadDataAsync.bind(this)}
                                isUsingInteraction={false}
                                onReady={async () => {
                                    await CommonUtils.waitAfterInteractions();
                                    this.splashView && this.splashView.hide();
                                }}
                                onError={() => {
                                    this.splashView && this.splashView.hide();
                                }}
                                onRender={this.renderContent.bind(this)}/>
                <SplashView ref={(ref) => {this.splashView = ref}}
                            appIcon={require("../assets/ic_launcher.png")}/>
            </View>
        )
    }
    
 
    render() {
        console.log("render App Loadding");
        if (Keys.showSplashView) {
            return this._renderWithSplashView()
        } else
            return this._renderNoSplash();
    }