0

This error is observed on Samsung note 10, Not on all devices, But mostly on Samsung The keyboard covers up half of the Textinput, I've tried a couple fixes, But none is working.

<KeyboardAvoidingView
  style={{ flex: 1 }}
  behavior="padding"
>
  <GiftedChat
    // style={{ flex: 1 }}
    messages={this.state.messages}
    onSend={this.onSend.bind(this)}
    renderBubble={this.renderBubble}
    isAnimated
    renderMessageImage={(props) => (
      <this.renderMessageImage props={props} _this={this} />
    )}
    user={{
      _id: this.state.uid,
    }}
  />

            </View>
          </KeyboardAvoidingView >
        );

I also used

{ Platform.OS === 'android' ? <KeyboardSpacer /> : null }

But it didn't work either

Chat screen React Native

Rajan
  • 1,512
  • 2
  • 14
  • 18
Peter Ola
  • 132
  • 8

1 Answers1

0

I was a able to fix it myself, Apparently it seems android Q now added auto keyboard support and there are no need for extra keyboard helper.

This is my updated code

 {Platform.OS === "android" && Platform.Version < 29 && (
      <KeyboardSpacer />
    )}
Peter Ola
  • 132
  • 8