Wix react-native-navigation共享元素过渡不起作用

问题描述 投票:0回答:1

我一直在尝试使用wix react本地导航共享元素过渡动画。但是它不起作用,并且在这方面似乎没有太多帮助。

屏幕2被推入堆栈,但是没有共享元素动画。我已经尝试了几乎所有东西。无效

屏幕1:

<View style={styles.inputContainer}>

              <Button
                title="SignUp"
                style={{...buttonStyle, ...formDimensions.dimensions}}
                nativeID={`signUpButton1`}
                onPress={() => {
                  this.signUpButtonHandler();
                }}
              />
    </View>

signUpButtonHandler = () => {
    Navigation.push(this.props.componentId, {
      component: {
        name: 'mainApp.SignUpScreen',
      },
      options: {
        animations: {
          push: {
            enabled: true,
            sharedElementTransitions: [
              {
                fromId: `signUpButton1`,
                toId: `signUpButtonDest`,
                duration: 300
              },
            ],
          },
        },
      },
    });
  };

屏幕2:

<View style={styles.inputContainer}>
              <Button
                title="SignUp"
                style={{
                  ...buttonStyle,
                  ...formDimensions.dimensions,
                  ...styles.button,
                }}
                nativeID={`signUpButtonDest`}
                onPress={() => {
                  this.signUpButtonHandler();
                }}
              />
react-native react-native-navigation shared-element-transition wix-react-native-navigation
1个回答
0
投票

您是否尝试过仅使用常规的ViewImage来查看这些组件是否正常工作?是Button来自react-native还是您的自定义组件?

© www.soinside.com 2019 - 2024. All rights reserved.