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

143
Visualizações
Why is the touchable area so small of this TouchableOpacity?

When I press the TouchableOpacity, it highlights, but a little over half of the time, it doesn't log press.

Why is the touchable area so small? It feels like it is only 1 x 1 pixel.

I already tried quite a few things, such as using a <View> wrapper and setting the width and height of the TouchableOpacity component.

<List.Item
      onPress={undefined}
      right={() => {
          return (
            <TouchableOpacity
              onPress={() => console.log('press')}
              style={{
                top: 18,
                right: 10,
                position: 'absolute',
              }}
            >
              <FontAwesome name="trash" size={16} color="#FF0000" />
            </TouchableOpacity>
          );
        }
/>
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

TouchableOpacity has the size of the content in this example which means if the icon is very small then your touchable area will be very small. I usually set a square sized container style for icons and increase the size when necessary

<List.Item
  onPress={undefined}
  right={() => {
      return (
        <TouchableOpacity
          onPress={() => console.log('press')}
          style={{
            top: 18,
            right: 10,
            position: 'absolute',
            height: 20,
            width: 20
          }}
        >
          <FontAwesome name="trash" size={16} color="#FF0000" />
        </TouchableOpacity>
      );
    }/>
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