Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

307
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda