【发布时间】:2010-11-24 10:03:29
【问题描述】:
我在 attrs.xml 中定义了一组自定义 Android 布局参数。现在我想在我的 styles.xml 文件中使用一些标签。
目前我收到此错误:
error: Error: No resource found that matches the given name: attr 'custom:tag'
我已尝试如下声明自定义 XML 命名空间:
<resources
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:custom="http://schemas.android.com/apk/res/com.my.project"
>
希望每个布局声明中使用的相同逻辑都可以在这里应用,但没有成功。
【问题讨论】:
-
请张贴styles.xml中的代码
-
<style name="my_style"> <item name="custom:tag">some_value</item> </style>
标签: android