我只想使用 Lottie View 在 React Native 中播放动画的一部分,长度约为 5 秒,而速度= {1} 我只想播放前 3 秒,然后转到下一个屏幕,代码如下
徽标屏幕.js:
import React from 'react';
import { StyleSheet, View, Image, TextInput, StatusBar, Text } from "react-native";
import Icons from 'react-native-vector-icons/Ionicons';
import LottieView from "lottie-react-native";
export default class ChatScreen extends React.Component {
onAnimationFinish = () => {
this.props.navigation.navigate("Login")
}
render () {
return (
<View style={styles.container}>
<StatusBar barStyle="light-content" backgroundColor="#161f3d" />
<View>
<LottieView
source={require('../assets/animations/lottie/MotionCorpse-Jrcanest.json')}
style={{ justifyContent: "center", alignSelf: "center", height: "100%", width: "100%" }}
autoPlay
loop={false}
speed={1}
onAnimationFinish={this.onAnimationFinish}
/> …Run Code Online (Sandbox Code Playgroud) 实际上,根据我的知识,我是反应本机的初学者,我有两种安装反应本机的选项,即反应本机 CLI 和 Expo CLI。我很困惑哪个更适合初学者安装和使用React Native 应用程序开发,哪个对初学者有更多的支持
reactjs react-native react-native-android react-native-navigation expo