shape的基本用法
阿新 • • 發佈:2017-05-05
enc schema 顏色 顏色漸變 mas utf pad 半徑 start
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- 邊角的圓弧半徑 -->
<corners android:radius="9dp" />
<!-- 實心填充 -->
<solid android:color="#00000000" />
<!-- 描邊:一般大小都是1dp -->
<stroke
android:width="1dp"
android:color="#ff000000" />
<!-- 四周留出來的空白,和xml文件中的pad效果一樣,對內起作用 -->
<padding
android:bottom="30dp"
android:left="20dp"
android:right="30dp"
android:top="20dp" />
<!-- 背景顏色漸變 -->
<gradient
android:angle="90"
android:endColor="#ff00ff00"
android:startColor="#ff0000ff" />
</shape>shape的基本用法
