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

时间:2020-02-08 05:37:28

标签: android ios reactjs react-native react-redux

      <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';

3 个答案:

答案 0 :(得分:0)

之前曾面对过这个问题,并从react native中导入了该问题,not react native手势处理程序或使用具有透明属性而不是touchable的按钮

答案 1 :(得分:0)

使用

import { TouchableWithoutFeedback } from 'react-native';

代替

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

答案 2 :(得分:0)

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