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

134
Views
¿Por qué el área táctil de esta TouchableOpacity es tan pequeña?

Cuando TouchableOpacity , se resalta, pero un poco más de la mitad de las veces, no registra press .

¿Por qué el área táctil es tan pequeña? Se siente como si fuera solo 1 x 1 píxel.

Ya probé algunas cosas, como usar un envoltorio <View> y configurar el width y el height del componente TouchableOpacity .

 <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 answers
Answer question

0

TouchableOpacity tiene el tamaño del contenido en este ejemplo, lo que significa que si el ícono es muy pequeño, su área táctil será muy pequeña. Por lo general, establezco un estilo de contenedor de tamaño cuadrado para los íconos y aumento el tamaño cuando es necesario

 <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 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!