是否可以在23以前的Android API中创build固定大小的绘图?

这是一个用于单选button的select器:

<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_checked="true"> <layer-list> <item> <shape android:shape="rectangle"> <solid android:color="@color/ColorPrimaryDark" /> </shape> </item> <item> <layer-list> <item android:gravity="center_vertical|left" android:left="20dp"> <shape android:shape="oval"> <size android:width="20dp" android:height="20dp" /> <stroke android:color="#ffffff" android:width="2dp" /> </shape> </item> <item android:gravity="center_vertical|left" android:left="25dp"> <shape android:shape="oval"> <size android:width="10dp" android:height="10dp" /> <solid android:color="#ffffff" /> </shape> </item> </layer-list> </item> </layer-list> </item> <item android:state_checked="false"> <layer-list> <item> <shape android:shape="rectangle"> <solid android:color="@color/ColorPrimary" /> </shape> </item> <item android:gravity="center_vertical|left" android:left="20dp"> <shape android:shape="oval"> <size android:width="20dp" android:height="20dp" /> <stroke android:color="#ffffff" android:width="2dp" /> </shape> </item> </layer-list> </item> </selector> 

在Android API 23中,它看起来像以下(应用时):

API 23

但在Android API 22中,它看起来如下所示:

API 22

有没有一种方法来定义API 23以前的可绘制的固定大小的vector(即非位图)?

Solutions Collecting From Web of "是否可以在23以前的Android API中创build固定大小的绘图?"