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

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

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