android定義圓角矩形

來源:互聯網
上載者:User

[html]<?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>   <?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>[html] <PRE class=html name="code">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"          /></PRE><BR>  <BR>  <PRE></PRE>  <PRE class=html name="code" sizcache="0" sizset="5"><PRE class=html name="code" sizcache="0" sizset="6"><PRE class=html name="code" sizcache="0" sizset="7"><PRE class=html name="code" sizcache="0" sizset="8"><PRE class=html name="code" sizcache="0" sizset="9"><PRE></PRE>  <PRE></PRE>  <PRE></PRE>  <PRE></PRE>  <PRE></PRE>  <PRE></PRE>  <PRE></PRE>  <PRE></PRE>  <PRE></PRE>  <PRE></PRE>    </PRE></PRE></PRE></PRE></PRE> 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.