为什么 Android 对 ConstraintLayout 使用单独的 xmlns

Why Android use separate xmlns for ContraintLayout

我对 Android 中的 ConstraintLayout 有点困惑。我正在了解它,首先我感到困惑的是为什么 android 为它使用单独的 xml 命名空间? xmlns:app="http://schemas.android.com/apk/res-auto"

ConstraintLayout 是 Layout 的一部分,那么为什么 google 没有将它添加到旧命名空间中? xmlns:android="http://schemas.android.com/apk/res/android"

以及为什么 android 需要在 XML 中写入完整的限定名称? android.support.constraint.ConstraintLayout 为什么不只是 ConstraintLayout?作为 RelativeLayout?

ConstraintLayout is part of Layout then why google didn't added it in the old namespace?

这是为平台定义的属性保留的。 ConstraintLayout 来自图书馆,而非平台。

and why android required to write full qualified name in XML? android.support.constraint.ConstraintLayout why not just ConstraintLayout?

Android 只知道使用 shorthand、bare-class-name-only 符号在几个平台定义的包中查找视图。 android.support.constraint 来自图书馆,而非平台。