美文网首页
Android 圆角(shape)

Android 圆角(shape)

作者: Jian_98 | 来源:发表于2020-04-06 19:34 被阅读0次
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- rectangle(矩形,默认值)
        oval(椭圆,此时corners 节点会失效)
        line(直线,此时必须设置stroke 节点不然会报错)
        ring(圆环)
-->
<!--    指定了形状内部的填充颜色-->
    <solid android:color="#F69C13"/>
<!--    指定了形状边线的粗细与颜色-->
    <stroke
        android:width="5dp"
        android:color="#9A0606"/>

    <!--指定了形状四个圆角的半径-->
    <corners
        android:bottomLeftRadius="10dp"
        android:bottomRightRadius="10dp"
        android:topLeftRadius="10dp"
        android:topRightRadius="10dp"/>
</shape>

相关文章

网友评论

      本文标题:Android 圆角(shape)

      本文链接:https://www.haomeiwen.com/subject/wlfiphtx.html