isme
isme

Reputation: 67

keyboard avoid view not enough height

keyboard pushes "CreateComment" component to top but not enough height ,it's still hides the "CreateComment" component which it includes "InputText"

     <ScrollView >
                 ....
      </ScrollView> 

     <KeyboardAvoidingView behavior='position'>
      <View  style={styles.footer}>
       <CreateComment GetComments={()=>this.GetComments()}
        roomId={this.state.postID} />
       </View>
      </KeyboardAvoidingView> 

</View>

and here is stlye:

container: {
flex: 1, 
},
footer :{ 
 position:'absolute',
 bottom:0 },
...

Upvotes: 0

Views: 405

Answers (1)

hong developer
hong developer

Reputation: 13916

You can change the height you want to specify yourself.

You can use offset

Example

<KeyboardAvoidingView
          behavior="position"
          keyboardVerticalOffset={100}
        >

Upvotes: 1

Related Questions