【发布时间】:2018-03-03 04:32:25
【问题描述】:
我想用给定的例子在xml中绘制like this.
<?xml version="1.0" encoding="utf-8"?><layer-list xmlns:android="http://schemas.android.com/apk/res/android"><item android:right="100dp">
<shape android:shape="rectangle">
<size android:height="100dp" android:width="100dp"/>
<solid android:color="@android:color/black"/>
</shape></item><item android:left="100dp"><shape android:shape="rectangle">
<size android:height="100dp" android:width="100dp"/>
<solid android:color="@android:color/holo_green_light"/>
</shape></item></layer-list>
但它在 2 个形状之间没有中间切口。给定的形状也应该适用于任何宽度。所以不想定义任何宽度限制
【问题讨论】:
-
是按钮样式吗?
-
@droid 编辑了我的代码,现在检查一下