Reputation: 596
Why does most of the XML attributes start with android:? It seems like a great waste of typing...
Upvotes: 0
Views: 219
Reputation:
That's just the XML namespace for all android related tags/attributes that you define in the root elements of your XML files. If you don't want to type that much, you can change
xmlns:android="http://schemas.android.com/apk/res/android"
to
xmlns:a="http://schemas.android.com/apk/res/android"
This allows you to use elements in a way like
a:id=".."
Instead of a you can use any other name/letter combo too.
Upvotes: 4
Reputation: 3520
its about namespace. create your own custom view with custom attributes, and you'll see the difference.
Upvotes: 0
Reputation: 69228
This is the namespace defined by xmlns:android="http://schemas.android.com/apk/res/android"
.
Upvotes: 1