Sunday, November 15, 2015

How to change Option menus background and Text color in android

Use this style  in your application  and get your change

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">

    <!--To change the text styling of options menu items</item>-->  
    <item name="android:itemTextAppearance">@style/MyActionBar.MenuTextStyle</item>
    <!--To change the background of options menu-->  
    <item name="android:itemBackground">@color/orangein</item>
</style>

<style name="MyActionBar.MenuTextStyle" parent="style/TextAppearance.AppCompat.Widget.ActionBar.Title">
    <item name="android:textColor">@color/white</item>
    <item name="android:textStyle">bold</item>
    <item name="android:textSize">25sp</item>
</style>

No comments:

Post a Comment