Source code of Article http://www.androidhive.info/2013/11/android-working-with-action-bar/