繁体   English   中英

为什么我的设计在我使用时消失了<TouchableWithoutFeedback> ?

[英]Why my design gets disappear when I use <TouchableWithoutFeedback>?

      <View style={{flex:1}} >
      <ImageBackground
          source={require('../images/back02.png')}
          style={styles.bgscreen}
          onPress={Keyboard.dismiss}
          >
          <KeyboardAvoidingView behavior='position'>
          <Image
          style={styles.headImage}
          source={require('../images/login_img.png')} />
        <ImgBack navigation={this.props.navigation} />
        </KeyboardAvoidingView>
        </ImageBackground>
        </View>
        </TouchableWithoutFeedback>

如果我删除<TouchableWithoutFeedback>那么一切都很好。 帮我。 不要询问子组件代码。 没有必要知道这一点。 那里一切都很好。

我只是遇到了<TouchableWithoutFeedback>

我已经import { TouchableWithoutFeedback } from 'react-native-gesture-handler';导入了import { TouchableWithoutFeedback } from 'react-native-gesture-handler';

适用于 ios 和 android 平台。

style={{height: '100%'}}到您的TouchableWithoutFeedback组件

之前遇到过这个问题并从 react native 导入它而不是 react native 手势处理程序或使用具有透明属性的按钮而不是可触摸的

导入语句有问题。 采用

import { TouchableWithoutFeedback } from 'react-native';

反而

import { TouchableWithoutFeedback } from 'react-native-gesture-handler';

暂无
暂无

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

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