LinearLayout加边框

给LineLayout的左、右和底部加边框,定义下面的white_border.xml文件:

<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<shape>
<solid android:color="@color/drak_grey" />
</shape>
</item>
<item
android:bottom="2dp"
android:left="2dp"
android:right="2dp">
<shape>
<solid android:color="#ffffff" />
</shape>
</item>

</layer-list>

最后应用:

 <LinearLayout android:background="@drawable/white_border" >

posted on 2015-03-02 10:04  symcious  阅读(3613)  评论(0编辑  收藏  举报

导航