drawable 里的文件

 

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

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

<size
android:height="25dp"
/>
<stroke
android:width="1dp"
/>

</shape>

 

为所属组件:

<solid android:color="#c4deff" /> 设置背景

<stroke android:width="1dp"/>  设置边框

然后用background属性调用就可以了。

http://www.eoeandroid.com/thread-76280-1-1.html