Questions tagged [touchablehighlight]

59 questions
3
votes
3 answers

TouchableHighlight and TouchableOpacity get highlighted on render()

I experience a behaviour where TouchableHighlight and TouchableOpacity reacts visually upon render (onPress is not being called). One thing is that it looks just a little strange, when I enter the page and my button make a small "blink". This is…
sune
  • 171
  • 1
  • 9
3
votes
2 answers

Child of TouchableHighlight loses opacity styling on press

When a child of a TouchableHighlight has an opacity, its opacity disappears (is set to 1) after the TouchableHighlight is pressed. Running example here: https://rnplay.org/apps/c0NIjQ Minimal example: {}}> …
ArneHugo
  • 6,051
  • 1
  • 26
  • 47
2
votes
1 answer

React-Native TouchableHighlight onFocus not work in Android TV

I'm trying to create an app with React Native + Expo for Adnroid TV and onFocus doesn't work on any element. I tried to fix it by migrating to "react-native": "npm:react-native-tvos@latest" but that doesn't work either. Any idea how to fix…
2
votes
1 answer

how to focus / blur event on button list react native

I'm trying to emulate focus/ blur event in react native with no success. I have two components, Home and Button. In home i render a list of buttons(category1, category2 and category3). Here is my code: ---HOME COMPONENT---- state = { categories:…
Aramillo
  • 3,176
  • 3
  • 24
  • 49
2
votes
0 answers

Webview on Android can't be clicked if wrapped in Touchable

This is Android specific problem in react native app. To be more precise, this issue can be produced on Samsumg S6 Edge, Pixel 2 etc. and it works with other Android phones. I have a webview (which plays video) wrapped under Touchable as shown…
2
votes
2 answers

react-native - TouchableHighlight - onPress - pass Parameter - if i pass the iterator var it is every time the highest number

how i can pass successfull and id for which touchable is passed. for(var i = 0; i < datasource.length;i++){ var currentIndex = i; this.viewCollection.push( this.handleItemTouch(currentIndex)}…
Kurt57
  • 17
  • 1
  • 5
1
vote
0 answers

React Native Area On Screen Not Clickable

For some reason theres an imaginary block in the middle of the screen that wont allow me to click parts of TextInput's or TouchableOpacity/TouchableHighlights (i.e. buttons with icons, text, padding and colour), if that part is inside this imaginary…
1
vote
0 answers

TouchableOpacity not working on android - react native

I facing some problem with TouchableOpacity...it works perfectly on ios but not android. I'm very sure that i import from "react-native" Not "react-native-gesture-handler". Then i change to use TouchableHighlight from "react-native-gesture-handler"…
1
vote
0 answers

Wrapping Image tag inside a TouchableHighlight tag is not working properly

I am a beginner in React native so I'm sorry if that may sound silly but whenever i wrap the Image tag in a TouchableHightlight tag the Image disappears completely from my screen How can i solve this, Please?
1
vote
1 answer

onPress handler not being fired over TouchableHighlight on Android

We are experiencing a weird issue. The thing is that when you press the button, for some reason the Highlight to the underlayColor is occurring but the Touchable is not firing the onPress handler. The onPress handler is ran if you continue pressing…
1
vote
1 answer

TouchableHighlight inside Viewpager taking page-change event as click in react-native ios

We have used view pager (react-native-community/react-native-viewpager) in our app, and there are 3 sections of each and every page , all 3 sections are clickable, for making it clickable we are using TouchableHighlight. So whenever I'm changing my…
Tushar Pandey
  • 4,557
  • 4
  • 33
  • 50
1
vote
1 answer

Dynamically rendered touchable not updating with state value change

Summary I am trying to make a react native color picker component, that will place a border around which one is selected. The component allows the coder to pass an array of colors they want to use, so I am rendering it dynamically by passing an…
ty1
  • 334
  • 4
  • 19
1
vote
1 answer

React Native Tooltip with Icon and TouchableHighlight?

I am working on a [Tooltip][1] the users can click for an explanation. it looks like this my explanation} backgroundColor={'rgb(255, 179, 16)'}> ? The problem with this is that the user…
user10998653
1
vote
1 answer

Button getting pressed when is created directly under an already long pressed button

I have a button (a TouchableHighlight) labeled BOOM and another button labeled thinking. Initially, the boom button is shown and on long press it should be replaced by the thinking button. And when the thinking button is pressed, it should be…
mahmoudafer
  • 1,139
  • 3
  • 14
  • 30
1
vote
1 answer

TouchableOpacity and TouchableHighlight always disabled

I am trying to disable a TouchableOpacity element when username/password fields are not filled. It does not work. It is always in a disabled state. I printed the condition !this.state.username || !this.state.password to console and it is only false…
F. K.
  • 694
  • 3
  • 9
  • 23