Thursday, August 29, 2013

Android use namespace as prefix for attributes in library

Android use namespace as prefix for attributes in library

I am trying to implement the ActionBar through the support library, v7.
Because I want to support the app for Android 2.1 (API level 7) and above.
I read in http://developer.android.com/guide/topics/ui/actionbar.html
following: "Using XML attributes from the support library Notice that the
showAsAction attribute above uses a custom namespace defined in the tag.
This is necessary when using any XML attributes defined by the support
library, because these attributes do not exist in the Android framework on
older devices. So you must use your own namespace as a prefix for all
attributes defined by the support library."
My question is how do I use my own namespace as a prefix for all
attributes defined by the support library?
Step by step explanation please! //Thanks.

No comments:

Post a Comment