KeyboarAvoidView not working in APK

Please provide the following:

  1. SDK Version: 36
  2. Platforms(Android/iOS/web/all): Android

I know that this is already solved by others, but I can’t seem to make it work. I have jumbled every suggested fix around google but still can’t figure this out. When running on simulator everything works fine but in standalone app the keyboard always block the text input box

I have my keyboard at the bottom view with position absolute.

 <KeyboardAvoidingView
      style={{ flex: 1 }}
      behavior="padding"
      keyboardVerticalOffset={Platform.OS === 'ios' ? 0 : 80}
      enabled
    >
      <ScrollView style={{ flex: 1 }}>
        <View style={styles.container}>
          <View style={styles.commentContainer}>
            {comments &&
              comments.map((items, index) => {
                return (
                  <Comment
                    key={index}
                    {...items}
                    newsId={newsId}
                    comicsId={comicsId}
                    contentType={contentType}
                    listNeedsUpdate={handleListNeedsUpdate}
                  />
                )
              })}
          </View>
        </View>
      </ScrollView>

      <View style={styles.textInputContainer}>
        <FormTextInputArea
          value={commentText}
          handleFocus={handleFocus}
          handleChange={handleChangeText}
          handleSubmit={handleSubmitComment}
        />
      </View>
    </KeyboardAvoidingView>

this is the styling

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'flex-end',
    marginTop: 10,
    marginBottom: 50
  },
  textInputContainer: {
    backgroundColor: '#fff',
    flex: 1,
    marginHorizontal: 20,
    paddingBottom: 10,
    position: 'absolute',
    left: 0,
    right: 0,
    bottom: 0
  },
  commentContainer: {
    flex: 1,
    margin: 30
  }
})

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.