KeyboardAvoidingView无法提升内容

时间:2018-07-24 05:16:41

标签: reactjs react-native

当键盘处于活动状态时,我正在使用KeyboardAvoidingView向上推我的内容。但是我无法获取它来推送我的内容。我在这里做什么错了?

<LinearGradient colors={['#29aae1', '#4bc1b6']} style={{height: '100%'}}>
  <Content padder>
     <KeyboardAvoidingView behavior="padding" keyboardVerticalOffset={0} enabled>
         <Field label="First name" name="signUpFirstName" component={this.renderInput}
                validate={[required]}/>
         <Field label="Last name" name="signUpLastName" component={this.renderInput}
                validate={[required]}/>

         <TouchableOpacity block primary style={styles.nextBtn_active}
            onPress={Actions.signUp_email}><Text
            style={{fontFamily: 'gotham', fontSize: 18, color: 'white'}}
            allowFontScaling={false}>Next</Text>
         </TouchableOpacity>
     </KeyboardAvoidingView>
 </Content>
</LinearGradient>

0 个答案:

没有答案
相关问题