android中的shape用法

来源:互联网 发布:在vmware中安装ubuntu 编辑:程序博客网 时间:2024/06/04 08:53

自我研究shape用法

<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android"    android:shape="rectangle" >    <!-- 矩形 -->    <!-- android:shape="rectangle" -->    <!-- 椭圆 -->    <!-- android:shape="oval" -->    <!-- 直线 -->    <!-- android:shape="line" -->    <!-- 环形 -->    <!-- android:shape="ring" -->
    <!-- 渐变 -->    <gradient        android:centerColor="#0F0F00"        android:endColor="#00F0FF"        android:startColor="#FFF000"
//type 渐变的样式 linear :线性变化 radial :放射状   sweep:扫描状        android:type="sweep"        android:gradientRadius="50"        />    <!-- 描边 --><span style="white-space:pre"></span><stroke          android:width="9dp"          android:color="#888888" /> <!--     圆角 -->     <corners          android:radius="90dip"          /> <!--     定义内容离边界的距离 -->     <padding          android:bottom="10dip"          android:left="10dip"          android:right="10dip"          android:top="10dip" />
<!-- 填充-->  <solid android:color="#999999"/> </shape>
大家仔细研究之后,就会懂了,其实很简单!

0 0
原创粉丝点击