react native touchable

 <Button style={{marginTop: 30}}
                        onPress={() => {
                            Alert.alert("你点击了按钮!");
                        }}
                        onPressIn={() => {
                           
                        }}
                        onPressOut={() => {
                           
                        }}
                        onLongPress={() => {
                            
                        }}
                        title="点我!"
                />
<TouchableOpacity
              activeOpacity={0.5}>
<View style={styles.button}>
              <Text ref="event"  style={styles.buttonText}>常用的事件</Text>
            </View>
</TouchableOpacity>
TouchableHighlight,
TouchableNativeFeedback,
TouchableWithoutFeedback,
Button,
TouchableOpacity

猜你喜欢

转载自www.cnblogs.com/hualuoshuijia/p/9791358.html