Etiket Arşivleri: Dokunulabilir bileşenler

React Native – Dokunulabilir bileşenleri kavramak

TouchableHighlight TouchableNativeFeedback TouchableOpacity TouchableWithoutFeedback bileşenleri ile dokunulabilir bileşenler tasarlayabiliriz. Uzun basma işlevini onLongPress özelliği ile kullanabiliriz. <TouchableHighlight onPress={this._onPressButton} underlayColor=”white”> <View style={styles.button}> <Text style={styles.buttonText}>TouchableHighlight</Text> </View> </TouchableHighlight> <TouchableOpacity onPress={this._onPressButton}> <View style={styles.button}> <Text style={styles.buttonText}>TouchableOpacity</Text> </View> </TouchableOpacity> <TouchableNativeFeedback onPress={this._onPressButton} background={Platform.OS === ‘android’ ? TouchableNativeFeedback.SelectableBackground() : ”}> <View style={styles.button}> <Text style={styles.buttonText}>TouchableNativeFeedback</Text> </View> </TouchableNativeFeedback> <TouchableWithoutFeedback onPress={this._onPressButton} > <View style={styles.button}> <Text style={styles.buttonText}>TouchableWithoutFeedback</Text>>>>