【发布时间】:2020-08-13 20:51:07
【问题描述】:
我想为我的应用创建圆形按钮,该按钮是基于 react native 构建的。我已经尝试了下面的代码,但它们都不适合我。
代码 sn-p 1:<Button title="+" rounded="true"/>
代码 sn-p 2:addButton: {
width: 20,
height: 20,
borderRadius: 40
}
【问题讨论】:
-
react-native 按钮没有 style 属性。所以你必须使用
TouchableOpacity创建一个自定义按钮
标签: javascript android reactjs react-native mobile