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.
Here is an example of a menu:
The whole philosophy is to have
http://schemas.android.com/apk/res-auto
in the namespace attribute in rootmenu
. It doesn't matter what is the namespace identifier as long as it's valid and is used as such when usingshowAsAction
attributes. Does this answer your question?