Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/235.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android borderTopLeftRadius和其他3个角半径对应项不工作_Android_React Native - Fatal编程技术网

Android borderTopLeftRadius和其他3个角半径对应项不工作

Android borderTopLeftRadius和其他3个角半径对应项不工作,android,react-native,Android,React Native,我试图绕过方形视图的拐角,但发现拐角边界半径道具不起作用。我已经尝试了这四种方法(borderTopLeftRadius,bordertoprightraidius,borderBottomLeftRadius,borderbottomrightraidius),但都不起作用。虽然borderRadius道具工作正常。我在Mac OS上使用RN 0.12 代码片段如下所示 name ='Button' style = {{flex:1, backgroundColor:'white',borde

我试图绕过方形视图的拐角,但发现拐角边界半径道具不起作用。我已经尝试了这四种方法(
borderTopLeftRadius
bordertoprightraidius
borderBottomLeftRadius
borderbottomrightraidius
),但都不起作用。虽然
borderRadius
道具工作正常。我在Mac OS上使用RN 0.12

代码片段如下所示

name ='Button'
style = {{flex:1, backgroundColor:'white',borderBottomLeftRadius:30, borderBottomRightRadius:30, height:75,width:345 }}>

您需要添加边框宽度

style = {{flex:1, backgroundColor: 'white',borderBottomLeftRadius: 30, borderBottomRightRadius:30, height: 75,width: 345, borderWidth: 1 }}

我试过了,但除了在盒子周围加上一个黑色的边框外,它仍然没有绕过盒子的角落。我可以知道上面的代码适用的系统和RN版本信息吗?您需要在另一个
中包装,而不是在主
中包装,我相信您试图绕过主屏幕视图的一角,您的意思是我应该执行以下操作吗?测试我尝试了这个,但仍然没有圆角。我能知道你的平台是安卓吗?