【发布时间】:2014-10-23 18:40:05
【问题描述】:
我正在尝试定义需要材质主题原色的圆形可绘制对象。这是我的 xml 代码:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval" >
<solid android:color="?attr/colorPrimary"></solid>
</shape>
但我收到了InflateException。我读过我们不能在可绘制的 xml 中使用属性。那么有什么解决方法吗?
【问题讨论】: