0

i'm using TabView and in every tab i use flatList. every list item has phone and email button. But TouchableOpacity onpress not working so i use onPressOut. onPressOut working but it works when i touched in not when touched out. you guys have any ideas why this is happennig

<View style={styles.ButtonGroup}>
            <TouchableOpacity
              style={[styles.ButtonCont, {backgroundColor: '#BEF7D1'}]}
              onPressOut={() => {
                Linking.openURL(`tel:+90${data.item.kiraci_gsm1}`);
              }}>
              <Icon
                name={'phone'}
                type="font-awesome-5"
                size={24}
                color="#036122"
              />
            </TouchableOpacity>
            <TouchableOpacity
              style={[styles.ButtonCont, {backgroundColor: '#C6E1FF'}]}
              onPressOut={() => {
                Linking.openURL(`mailto:${data.item.kiraci_eposta1}`);
              }}>
              <Icon
                name={'envelope'}
                type="font-awesome"
                size={24}
                color="#0050AC"
              />
            </TouchableOpacity>
          </View>

enter image description here

yasin demir
  • 135
  • 1
  • 8
  • just clean your project using this command `cd android` and `./gradlew clean` and go back to your root directory with `cd..` and try to run again might be work.. – DhavalR Oct 12 '21 at 11:38
  • @DhavalSarvaiya i've done that so many times didn't work – yasin demir Oct 12 '21 at 11:42
  • @yasindemir I also facing the same issue, Did you found any solution for that. Thanks in advance – Praveen Feb 20 '23 at 04:22

1 Answers1

0

Pay attention from where import your "TouchableOpacity". When I changed "TouchableOpacity" from "react-native-gesture-handler" to "react-native" for Android platform.

maximus383
  • 584
  • 8
  • 25