XML中用 xmlns="http://schemas.android.com/apk/res-auto" 获取自定义属性值: public static String NAMESPACE = "http://schemas.android.com/apk/res-auto"; String test= attrs.getAttributeValue(NAMESPACE,"title");