Answers for "turn off touchable touchableopacity react native animation"

7

react native touchableopacity disable

<TouchableOpacity disabled={true}>
  <Text>I'm disabled</Text>
</TouchableOpacity>
Posted by: Guest on April-22-2020
1

touchableopacity as button in react native

//React Native Button element doesn't have style props and offers very 
//few customization. Use TochableXXX elements instead.
//TouchableOpacity works fine

import {
  TouchableOpacity,
  Text,
} from "react-native";

<TouchableOpacity
          style={styles.button}
          onPress={this.onSubmit}
          disabled={!this.state.isFormValid}
        >
          <Text style={styles.btnText}>Add
			</Text>
</TouchableOpacity>

const styles = StyleSheet.create({

  button: {
    width: 200,
    marginTop: 20,
    backgroundColor: "green",
    padding: 15,
    borderRadius: 50,
  },
  btnText: {
    color: "white",
    fontSize: 20,
    justifyContent: "center",
    textAlign: "center",
  },
});
Posted by: Guest on April-25-2020

Code answers related to "turn off touchable touchableopacity react native animation"

Code answers related to "Javascript"

Browse Popular Code Answers by Language