今天碰到一个问题,挺奇怪的,用shape做一个button的background
在用到corners的时候,如果是全部4个角都需要corner的情况,那直接设置android:radius就ok
但是比如要单独显示下面的两个圆角 或者单独显示下面的两个圆角就会不行,要么没反应,要么显示4个角
网上搜索了下,就有一个人说了这个问题,其他人好像用着都没问题??
这个drawable是这样写的:
下面两个圆角,其中item android:bottom即空开下面的距离再填充
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<shape android:shape="rectangle" >
<corners
android:radius="8dp" />
<solid
android:color="#ffffff" />
</shape>
</item>
<item android:bottom="8dp">
<shape android:shape="rectangle" >
<solid
android:color="#ffffff" />
</shape>
</item>
</layer-list>