react native TouchableOpacity onpress problem

746 Views Asked by At

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

1

There are 1 best solutions below

1
On

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