Android中shape的使用方法总结

<?xml version="1.0" encoding="utf-8"?>  
<shape xmlns:android=" http://schemas.android.com/apk/res/android ">  
   <gradient android:startColor="#c0000000"  android:endColor="#c0000000"  
                android:angle="90" /><!--背景颜色渐变 -->  
    <solid android:color="#00ffffff" /><!-- 背景的填充颜色 -->  
    <stroke android:width="3dp" color="#ff000000" /><!-- 描边,width是边得宽度,color是颜色 -->  
    <corners android:radius="10dp" /><!-- 边角圆弧的半径 -->  
    <padding   
       android:left="3dp"  
       android:top="3dp"   
       android:right="3dp"  
       android:bottom="3dp" /><!-- 四周留出来的空白 -->  
</shape> 

猜你喜欢

转载自www.cnblogs.com/ldxsuanfa/p/10888218.html