原來(lái)我是這么寫(xiě)的
<shape xmlns="http://schemas.android.com/apk/res/android"
shape="rectangle">
<solid color="@color/black"/>
<corners radius="10dp"/>
<stroke
width="3dp"
color="#2E3135" />
</shape>
然后發(fā)現(xiàn)要這么寫(xiě)
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/black"/>
<corners android:radius="10dp"/>
<stroke
android:width="3dp"
android:color="#2E3135" />
</shape>