Android的布局是在XML中定义的,根元素中声明了此命名空间:
xmlns:android="http://schemas.android.com/apk/res/android"
元素的示例:
<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" />
- 为什么使用
android
前缀而不像xmlns="http...
那样省略它? - 为什么前缀只在属性中使用,而不在元素中使用?