Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- handleClick = (link) => {
- Linking.canOpenURL(link).then(supported => {
- if (supported) {
- Linking.openURL(link);
- } else {
- console.log('Don't know how to open URI: ' + link);
- }
- });
- };
- <View style={styles.AddressRow}>
- {
- item.Online != ''? <TouchableOpacity onPress={() => Linking.openURL( item.Online )}>
- </TouchableOpacity>: null
- }
- <TouchableOpacity onPress={() => Linking.openURL(item.Online)}>
- <Text style={styles.underLineText}>Online</Text>
- </TouchableOpacity>
- [
- {
- "id":"1",
- "fk": 1,
- "addr": "Test Drive",
- "phone": "951-955-6200",
- "LatL":"33.9",
- "Long2":"-117.373423",
- "Online": "http://www.test.com",
- "image" : "png"
- },
- {
- "id":"3",
- "fk": 1,
- "addr": "880 N State St, Hemet 92543-1496",
- "phone": "951-955-6200",
- "LatL":"33.7",
- "Long2":"-116.971169",
- "Online": "",
- "image" : "Home"
- }
- ]
- <View style={styles.AddressRow}>
- {item.Online !== '' && <TouchableOpacity onPress={() => Linking.openURL(item.Online)}>
- <Text style={styles.underLineText}>Online</Text>
- </TouchableOpacity>}
Add Comment
Please, Sign In to add comment