Why don't style and layout use the android namespace?
Looking at the source of LayoutInflater
, there doesn't seem to be a obvious reason why it's layout
in a include tag and not android:layout
. I guess since the include tag is a special case in a layout there's no need for the android prefix.
The include tag is not processed at compile time however, else it wouldn't be in LayoutInflater
now wouldn't it ;)
As for style
, I don't know for sure, but I think the reason is that namespaced attributes are defined in XML
and passed as AttributeSet
in the View
constructor. The style however isn't passed in that set, but as a separate parameter. So I think the reasoning is that style
is a parameter that is always there, while namespace prefixed attributes are dynamic and custom for a View
.
So no definite answer from me, but maybe it helps ;)