Use Action Bar in an Android app

Follow the instruction to add Support Libraries with resouces.  If the Eclipse is on a drive different from that of Android SDK, it is critical to check "Copy to workspace" when importing the existing Android project.

Follow the instructions to modify Activity classes and the AndroidManifest.xml. This may lead to errors for the following code in attrs.xml in the /res/values folder:

<attr name="buttonBarStyle" format="reference"></attr>

<attr name="buttonBarButtonStyle" format="reference"></attr>

They may be already defined in the support libraries, they need to be commented out.

Note: the android:showAsAction attribute is available only on Android 3.0 (API Level 11) and greater, so to accommodate earlier versions of Android, one need to define its app's name space in the menu's xml file as following:

xmlns:yourapp="http://schemas.android.com/apk/res-auto

then use the atribute like the following:

onvifer:showAsAction="ifRoom"

In other words, follow the  the instructions strictly.