ReactNative Touchable 组件
来源:互联网 发布:简明python mobi 编辑:程序博客网 时间:2024/05/18 11:04
ReactNative Touchable 组件。
import React, {Component} from 'react';import { AppRegistry, StyleSheet, Text, View, TouchableOpacity, TextInput, Image,} from 'react-native';/**6、Touchcable 系列组件 TouchcableOpacity 透明触摸,点击时,组件会出现透明过度效果 TouchcableHighlight 高亮触摸,点击时,组件会出现高亮效果 TouchcableWithoutFeeback 五反馈性触摸,点击时,组件无视觉变化 需要导入组件 */let RnDemo = React.createClass({ clickBtn: function () { alert("点击搜索按钮"); }, render: function () { return ( <View style={styles.container}> <View style={styles.flex}> <View style={styles.input}></View> </View> <TouchableOpacity style={styles.button} onPress={this.clickBtn}> <Text style={styles.search}>搜索</Text> </TouchableOpacity> </View> ); }});let styles = StyleSheet.create({ container: { flexDirection: "row", height: 45, marginTop: 25, }, flex: { flex: 1 }, input: { height: 45, borderWidth: 1, marginLeft: 5, paddingLeft: 5, borderColor: "#CCC", borderRadius: 4, }, button: { width: 55, height: 45, marginLeft: 5, marginRight: 5, backgroundColor: "#23BEFF", justifyContent: "center", alignItems: "center", }, search: { color: "#FFF", fontSize: 15, fontWeight: 'bold' }, });
阅读全文
1 0
- ReactNative Touchable 组件
- 【原创】东方耀reactnative 视频18之-Touchable组件
- Touchable系列组件
- TextInput组件和Touchable组件
- (五)React Native---Touchable组件
- React Native Touchable系列组件
- react native 封装Touchable 组件
- React Native交互组件之Touchable
- React Native——Touchable类组件
- react native Touchable 系列组件使用详解
- React Native 组件之Touchable*源码解析
- React Native组件篇(四) — Touchable系列组件
- ReactNative-Image组件
- ReactNative-Picker组件
- ReactNative-Switch开关组件
- ReactNative-WebView组件
- ReactNative开源组件
- ReactNative组件生命周期
- HttpServletBean
- RecyclerView notifyDataSetChanged不起作用
- 将海康大华等网络摄像机RTSP流进行网页Flash rtmp和H5 hls直播的技术方案
- jmeter性能测试
- Android基础(2):数组,列表,循环和自定义类
- ReactNative Touchable 组件
- 为何不能在头文件里写定义?
- 【大数据部落】从网络图看数字媒体对传统媒体的影响
- Xlistview多条目展示
- fastJson的Demo
- java 中调用window系统中的文件,或者执行命令(shell、.CMD、.EXE)并获取返回值
- Android ViewPager 属性clipToPadding的巧妙用法
- js短信验证码无视刷新
- base-122编码,比base-64更加高效