xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:custom="http://schemas.android.com/apk/res-auto"
上面两行代码使我们在andorid xml文件中经常看到的,第一行是引用android系统自带的属性,第二行是引用lib包中的属性。
注意:
在eclipse和studio中又有所区别:
eclipse中如果要使用你自定义的属性 是不能用res-auto的,必须得替换成你自定义view所属的包名,如果你在恰好使用的自定义属性被做成了lib那就只能使用res-auto了;
android-studio中,无论你是自己写自定义view还是引用的lib里的自定义的view 都只能使用res-auto这个写法。以前那个包名的写法在android-studio里是被废弃无法使用的。