android shape stroke只绘制一边或者某几边

 1 <?xml version="1.0" encoding="utf-8"?>
 2 <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
 3 
 4     <item
 5         android:right="-2dp"
 6         android:top="-2dp">
 7         <shape>
 8             <solid android:color="@color/white" />
 9             <stroke
10                 android:width="1px"
11                 android:color="@color/split_line" />
12         </shape>
13     </item>
14 </layer-list>

-2dp表示不绘制这一边

posted @ 2017-06-09 20:15  陈炳序  阅读(1492)  评论(0编辑  收藏  举报