I'm trying to understand the various Android XML namespaces, including
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
- They appear to be standard namespaces, but are these namespace URIs also standard? That is, can they be different from the URIs above?
- If these are indeed standard namespaces, what are the elements defined within
these namespaces? From browsing the documentation, it seems that the
android
namespace elements are defined on a per-resource basis. For example, if I'm interpreting the docs currently, in the context of a menu resource, the elements available areid
,title
,titleCondensed
,showAsAction
, etc. But, sometimes I see theshowAsAction
element declared as theapp:showAsAction
, so I'm confused. - Where in the Android libraries are these namespaces defined?
I've been searching for documentation on Android XML namespaces to find answers to these questions and to learn how to better use them, but especially for xmlns:app
and xmlns:tools
, any reference of these namespaces I'm coming across are in Stack Overflow questions and not in any official Android docs. I'm wondering if someone can help me out.