简体   繁体   English

您如何在本机反应中为启动画面的传出过渡设置动画

[英]How do you animate the outgoing transition of a splash screen in react native

I have created an android splash screen using the react-native-splash-screen plugin.我使用 react-native-splash-screen 插件创建了一个 android 启动画面。 However, I have to make a zoom out transition for the splash screen before the main application screen loads.但是,我必须在主应用程序屏幕加载之前为启动屏幕进行缩小过渡。 Does anyone know how to do this?有谁知道如何做到这一点?

You can do that with a variation of the library:您可以使用库的变体来做到这一点:

import AnimatedSplash from "react-native-animated-splash-screen";

render() {
        return (
      <AnimatedSplash
        translucent={true}
        isLoaded={this.state.isLoaded}
        logoImage={require("./assets/logo.png")}
        backgroundColor={"#262626"}
        logoHeight={150}
        logoWidth={150}
      >
        <App />
      </AnimatedSplash>
    );
  }

Just look at the docs .只需查看文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM