


res/values/colors.xml XML Layout Fileĭefault content of android XML layout file. In this file I have defined different color value for option menu background, app text color, accent color, toolbar/app bar color, etc. Following is the complete content of styles.xml file.

To add background and text color of overflow menu just add two line of more code android:textColor and itemBackground in your project styles.xml file. Here I have added three items for option menu. src/ OverflowMenuBackgroundColor.java Option Menu Items Here you will see two override methods to add menu items in android application, onCreateOptionsMenu and onOptionsItemSelected. Java Activity Fileįollowing is the complete code of java activity file. Related: Floating Action Button (FAB) Using Android Design Support Library Android ActionBar Tabs Example Android Toolbar Example: How to Use Toolbar as ActionBar Android Example: Change the Background & Text Color of Android Option Menuįollowing is the content different files of android project to change the background and text color of android overflow menu. Following is the step by step guide to change the background color of android option menu/ overflow menu. Someone write it as difficult and tricky but here I am going to show you to change background and text color of your app option menu with simplest ways. In this tutorial, you will learn how to change the background color of android action bar option menu programmatically.Ĭhanging the background color of your android app option menu is not the very difficult. You can’t change the text and background color using android themes. Options menu can be customized according to our need, we can set or change the background color and text color. Android action bar option menu is also known as overflow menu which is shown to the users when they click/press the menu key on android phone and tablet.
