读书人

XML中的命名空间有关问题

发布时间: 2012-09-22 21:54:54 作者: rapoo

XML中的命名空间问题
注意:虽然很多人认为组件的属性必须以android命名空间开头,该命名空间的值必须是http://schemas.android.com/apk/res/android。实际上,只是命名空间的值必须是http://schemas.android.com/apk/res/android而已,命名空间的名称可以是任何值,如下面的代码

<?xml version="1.0" encoding="utf-8"?><!--  将android换成了abcd  --><LinearLayout xmlns:abcd="http://schemas.android.com/apk/res/android"    abcd:orientation="vertical" abcd:layout_width="fill_parent"    abcd:layout_height="fill_parent"></LinearLayout>

读书人网 >XML SOAP

热点推荐