android定义圆角矩形

<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle" >

    <gradient
        android:angle="90"
        android:endColor="#00000000"
        android:startColor="#00000000" />

    <corners
        android:bottomLeftRadius="12dp"
        android:bottomRightRadius="12dp"
        android:topLeftRadius="12dp"
        android:topRightRadius="12dp" />

    <stroke
        android:width="1dip"
        android:color="@color/gray" />
   

</shape>
android定义圆角矩形
 android:shape="rectangle"  有四种选择: ovil 椭圆、 line 横线、 ring 环形
 gradient 实体显示的颜色梯度,默认是透明
     
  	android:angle="90" // 角度
        android:endColor="#00000000"
        android:startColor="#00000000"
	android:startCentenr="#000000" 
    依次开始 ,中间, 结束 一个渐变的的过程 
 
 定义圆角
<corners
        android:bottomLeftRadius="12dp"
        android:bottomRightRadius="12dp"
        android:topLeftRadius="12dp"
        android:topRightRadius="12dp" />

定义圆角的边框颜色值
 <stroke
        android:width="1dip"
        android:color="@color/gray" />

定义实心颜色,也就是填充颜色值
<solid
        android:color="@color/color_white"
        />













  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值