非常教程

React native参考手册

Components: TouchableWithoutFeedback

TouchableWithoutFeedback

除非你有很好的理由,否则不要使用。所有响应按键的元素在触摸时都应该有一个视觉反馈。

TouchableWithoutFeedback只支持一个孩子。如果您希望有多个子组件,请将它们包装在View中。

属性

accessibilityComponentType?: AccessibilityComponentTypes

accessibilityTraits?: AccessibilityTraits, [AccessibilityTraits]

accessible?: bool

delayLongPress?: number

在onLongPress被调用之前,从onPressIn延迟ms。

delayPressIn?: number

在调用onPressIn之前,从触摸开始起延迟ms。

delayPressOut?: number

在触发onPressOut之前,从触摸的释放延迟ms。

disabled?: bool

如果为true,请禁用此组件的所有交互。

hitSlop?: {top: number, left: number, bottom: number, right: number}

这定义了您的触摸可以离开按钮多远。pressRetentionOffset从按钮移开时添加。 注意 触摸区域永远不会超出父视图边界,并且如果触摸碰到两个重叠视图,则兄弟视图的Z索引总是优先。

onLayout?: function

在装载和布局更改时调用

{nativeEvent: {layout: {x, y, width, height}}}

onLongPress?: function

onPress?: function

当触摸被释放时被调用,但如果被取消则不被触发(例如通过窃取响应者锁的滚动)。

onPressIn?: function

即使在onPress之前按下并调用可触摸元素,也会立即调用。这在发出网络请求时非常有用。

onPressOut?: function

即使在onPress之前,只要触摸被释放,就会被调用。

pressRetentionOffset?: {top: number, left: number, bottom: number, right: number}

当滚动视图被禁用时,这将定义您的触摸离开按钮有多远,然后停用按钮。一旦停用,请尝试将其移回,并且您会看到该按钮再次被重新激活!在滚动视图禁用时,将它来回移动数次。确保你传入一个常量来减少内存分配。

类型定义

事件

类型:

目的

Components: TouchableWithoutFeedback相关

React native

React Native 是一个 JavaScript 的框架,用来撰写实时的、可原生呈现 iOS 和 Android 的应用。

主页 https://facebook.github.io/react-native/
源码 https://github.com/facebook/react-native
发布版本 0.49

React native目录

1.开始 | Getting Started
2.指南 | Guides
3.APIs
4.组件:ActivityIndicator | Components: ActivityIndicator
5.组件:按钮 | Components: Button
6.组件:CheckBox | Components: CheckBox
7.组件:DatePickerIOS | Components: DatePickerIOS
8.组件:DrawerLayoutAndroid | Components: DrawerLayoutAndroid
9.组件:FlatList | Components: FlatList
10.组件:图像 | Components: Image
11.组件:KeyboardAvoidingView | Components: KeyboardAvoidingView
12.Components: ListView
13.Components: MaskedViewIOS
14.Components: Modal
15.Components: NavigatorIOS
16.Components: Picker
17.Components: PickerIOS
18.Components: ProgressBarAndroid
19.Components: ProgressViewIOS
20.Components: RefreshControl
21.Components: ScrollView
22.Components: SectionList
23.Components: SegmentedControlIOS
24.Components: Slider
25.Components: SnapshotViewIOS
26.Components: StatusBar
27.Components: Switch
28.Components: TabBarIOS
29.Components: TabBarIOS.Item
30.Components: Text
31.Components: TextInput
32.Components: ToolbarAndroid
33.Components: TouchableHighlight
34.Components: TouchableNativeFeedback
35.Components: TouchableOpacity
36.Components: TouchableWithoutFeedback
37.Components: View
38.Components: ViewPagerAndroid
39.Components: VirtualizedList
40.Components: WebView
41.创建 | Contributing
42.指南(Android) | Guides (Android)
43.指南(IOS) | Guides (iOS)
44.其他 | Miscellaneous