Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

305
Views
How do I hide the Android Keyboard when using React-Native-Gifted-Chat?

I am using React-Native-Gifted-Chat in my RN/Expo app. When a user goes to type a message, the message box should move up with the keyboard . This is the behavior I get on iOS, but with Android, it covers up the box.

I've tried enclosing a "KeyboardAvoidingView" around the "GiftedChat" prop, but it pushes the message box outside the screen.

I've also tried what is seen below, and while the keyboard doesn't go away, it still covers the message box when typing.

Below is my code:

<KeyboardAvoidingView>
    <SafeAreaView style = { styles.header }>
      <GiftedChat
        messages={}
        showAvatarForEveryMessage={true}
        onSend={messages => onSend(messages)}
        user={{
          _id:1,
        }}
      />
    </SafeAreaView>  
    </KeyboardAvoidingView>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Okay, so the solution below worked for me, but it might have only worked because this screen is simply a "Chat Screen" meaning:

Someone goes to this screen for the purpose of sending and receiving messages, nothing else.

To solve this, I eliminated all of the "Views" and it gave me the behavior I wanted.

Below is the updated code:

return(
    <GiftedChat
        messages={}
        showAvatarForEveryMessage={true}
        onSend={messages => onSend(messages)}
        user={{
          _id:1,
        }}
    />
)
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!