Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.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
User interface 使用不同的顶部和底部背景颜色来反应本机视图容器_User Interface_React Native_React Redux_React Jsx - Fatal编程技术网

User interface 使用不同的顶部和底部背景颜色来反应本机视图容器

User interface 使用不同的顶部和底部背景颜色来反应本机视图容器,user-interface,react-native,react-redux,react-jsx,User Interface,React Native,React Redux,React Jsx,尝试创建具有软边框的视图。页眉应该有不同的颜色,页脚应该有不同的颜色。我尝试了所有的可能性,但都想不出来。目前,我有下面的代码创建一个软边界视图,我想实现这一点 行业报告 您可以在容器视图上设置溢出:隐藏,但它仅适用于iOS 溢出:Android不支持隐藏 检查这个 如果您想在Android上实现这一点,可以在页眉和页脚组件上使用这些样式道具 borderTopLeftRadius borderTopRightRadius borderbottomrightradies borderBot

尝试创建具有软边框的视图。页眉应该有不同的颜色,页脚应该有不同的颜色。我尝试了所有的可能性,但都想不出来。目前,我有下面的代码创建一个软边界视图,我想实现这一点


行业报告

您可以在容器视图上设置
溢出:隐藏
,但它仅适用于iOS

溢出:Android不支持隐藏

检查这个

如果您想在Android上实现这一点,可以在页眉和页脚组件上使用这些样式道具

  • borderTopLeftRadius
  • borderTopRightRadius
  • borderbottomrightradies
  • borderBottomLeftRadius

下面是一个例子:

谢谢你,早上好。最后使用了borderTopLeftRadius,borderTopRightRadius,borderBottomRightRadius,BorderbottomLeftRadius我想知道谁会把我的问题降级。这是一个真实的问题,在我把它贴到这里之前我确实试过了,所以我并不是在盲目地寻找答案我想这是因为这个问题不够清楚。我认为
子视图没有剪裁成父视图的形状
更好。
<View style={{borderWidth: 1, borderRadius: 10, padding: 10}}>
      <View>
            <Text style={styles.name}>
                SECTOR REPORTS
            </Text>
            <Button title="ADD SECTOR REPORT"/>
    </View>