AndroidÖÐshapeÐÎ×´ÕûÀí
[ 2016-8-3 12:10:00 | By: w1539083963 ]
 
Ò»¡¢shapeÐÎ×´

1¡¢Ô²½Ç±ß¿ò

<?xml version="1.0"encoding="utf-8"?> 

<shapexmlns:android="http://schemas.android.com/apk/res/android" > 

         <!-- ÉèÖÃÔ²½Ç°ë¾¶ --> 

         <corners 

                android:topLeftRadius="2dp" 

                android:topRightRadius="3dp" 

                android:bottomLeftRadius="4dp" 

                android:bottomRightRadius="5dp"/> 

         <!-- Ìî³äµÄÑÕÉ«--> 

         <solid android:color="#ff3a3b3c" /> 

         <!-- ±ß¿òÑÕÉ«--> 

         <stroke android:color="#fafafa"/> 

         <!-- ½¥±äÑÕÉ«--> ¡®

         <gradient android:startColor="#ff8b03"android:endColor="#ff7522" /> 

 </shape>

2¡¢ÐéÏß

<?xml version="1.0"encoding="utf-8"?> 

<shapexmlns:android="http://schemas.android.com/apk/res/android"android:shape="line" >        <!-- ÏÔʾһÌõÐéÏߣ¬ÆÆÕÛÏߵĿí¶ÈΪdashWith£¬ÆÆÕÛÏßÖ®¼äµÄ¿Õ϶µÄ¿í¶ÈΪdashGap£¬µ±dashGap=0dpʱ£¬ÎªÊµÏß --> 

 <stroke 

         android:dashGap="2dp" 

         android:dashWidth="2dp" 

         android:width="1dp"

         android:color="@color/register_line"/> 

 <!-- ÐéÏߵĸ߶È--> 

 <size android:height="1dp" /> 

 </shape>

3¡¢ÐéÏ߱߿ò

<?xml version="1.0"encoding="utf-8"?> 

<shapexmlns:android="http://schemas.android.com/apk/res/android" > 

 <!-- Ô²½Ç--> 

 <corners 

         android:bottomLeftRadius="8dp" 

         android:bottomRightRadius="8dp" 

         android:topLeftRadius="8dp" 

         android:topRightRadius="8dp" /> 

         <!-- Ãè±ß--> 

         <stroke 

                android:dashGap="4dp" 

                android:dashWidth="4dp" 

                android:width="1dp" 

                android:color="@color/linegray" /> 

         <solid android:color="#FFFFFF"/> 

 </shape>
        4,ÖصþÔ²ÐΠ
        
<?xml version="1.0" encoding="utf-8"?>

<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >


    <item>

        <shape android:shape="rectangle" >

            <solid android:color="@color/order_list_yy_out" />


            <corners

                android:bottomRightRadius="7dp"

                android:topRightRadius="7dp" />

        </shape>

    </item>

    <item

        android:bottom="@dimen/finals_order_border"

        android:right="@dimen/finals_order_border"

        android:top="@dimen/finals_order_border">

        <shape android:shape="rectangle" >

            <solid android:color="@color/order_list_yy_inner" />


            <corners

                android:bottomRightRadius="4dp"

                android:topRightRadius="4dp" />

        </shape>

    </item>


</layer-list> 
        Èçͼ
         Í¼Æ¬

5¡¢µ×²¿ÏßÌõ±³¾°shape

<?xml version="1.0" encoding="utf-8"?>

<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >


    <item>

        <shape android:shape="rectangle" >

            <solid android:color="@color/color_lightgray" />

        </shape>

    </item>

    <item

        android:bottom="1px"

        android:left="0px"

        android:right="0px"

        android:top="0px">

        <shape android:shape="rectangle" >

            <solid android:color="#ffffff" />

        </shape>

    </item>


</layer-list>

6¡¢´øÓб߿òµÄÔ²½Ç¾ØÐÎ

<?xml version="1.0" encoding="utf-8"?>

<shape xmlns:android="http://schemas.android.com/apk/res/android" >


    <!-- ÉèÖÃÔ²½Ç°ë¾¶ -->

    <corners

        android:bottomLeftRadius="4dp"

        android:bottomRightRadius="4dp"

        android:topLeftRadius="2dp"

        android:topRightRadius="2dp" />

    <!-- Ìî³äµÄÑÕÉ« -->

    <solid android:color="@color/color_lightgray" />

    <!-- ±ß¿òÑÕÉ« -->

    <stroke android:color="#000000"

        android:width="1px" />


</shape>

7¡¢shpaeºÍ***or½áºÏʵÏÖ°´Å¥°´ÏÂЧ¹û

<?xml version="1.0" encoding="utf-8"?> 

<***or xmlns:android="http://schemas.android.com/apk/res/android"> 

 

    <item android:state_pressed="true"> 

        <shape> 

            <solid android:color="@color/color_lightgray"/>

            <corners android:radius="8dp" /> 

            <stroke android:color="@color/color_lightgray"

                android:width="1px"/>

        </shape> 

    </item>

    

    <item> 

        <shape> 

            <solid android:color="@android:color/white"/>

            <corners android:radius="8dp" />

            <stroke android:color="@color/color_lightgray"

                android:width="1px"/> 

        </shape> 

    </item> 

     

</***or> 

¶þ¡¢Ð§¹ûͼ


 
 
  • ±êÇ©£ºShape 
    ·¢±íÆÀÂÛ£º
     

    ʱ ¼ä ¼Ç Òä
    <<  < 2016 - >  >>
    ÈÕ Ò» ¶þ Èý ËÄ Îå Áù
    1 2 3 4 5 6
    7 8 9 10 11 12 13
    14 15 16 17 18 19 20
    21 22 23 24 25 26 27
    28 29 30 31
    ×î РÆÀ ÂÛ
    ×î РÈÕ Ö¾
    ×î РÁô ÑÔ
    ËÑ Ë÷
    Óà »§ µÇ ¼
    ÓÑ Çé Á¬ ½Ó


     
    ÌìÑIJ©¿Í»¶Ó­Äú£¡