how to Customize the Contextual Action Bar using appCompat in material design

You can change the ActionMode background through attribute actionModeStyle:

<style name="AppTheme.Base" parent="Theme.AppCompat.Light">
    ....
    ....
    <item name="actionModeStyle">@style/LStyled.ActionMode</item>
</style>

<style name="LStyled.ActionMode" parent="@style/Widget.AppCompat.ActionMode">
    <item name="background">@color/color_action_mode_bg</item>
</style>

You will of course need to define a color named color_action_mode_bg:

<color name="color_action_mode_bg">#009688</color>

There are other things you can change as well. Example:

<item name="titleTextStyle">...</item>
<item name="subtitleTextStyle">...</item>
<item name="height">...</item>

To change text color of SAVE and SAVETO, add the following to AppTheme.Base:

<item name="actionMenuTextColor">@color/color_action_mode_text</item>

Leave a Comment