Android 圆角(shape)

2020-04-06  本文已影响0人  Jian_98
<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>
上一篇下一篇

猜你喜欢

热点阅读