Why do we specify namespace in android xml file?

From developer.android.com

xmlns:android

Defines the Android namespace. This attribute should always be set to “http://schemas.android.com/apk/res/android”.

xmlns:android is for identification that this xml is used for android, not for other function.

Namespaces uniquely identify code/libraries. If I write an api that uses all the same names and such as the android api the only way to distinguish between my api and android api is to use the android namespace, or mine.

You can further refer http://en.wikipedia.org/wiki/XML_namespace

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)