How to apply styles to ActionMode

from the CommonsWare Community archives

At May 10, 2018, 3:33am, Shahood asked:

Hello,

Is there a way to apply styles and themes to ActionMode (the area of ActionBar that transforms to show options related to ActionMode)? I would like to change the fonts, their size, color and the background color of the ActionMode. How to do all that and more?

Thanks!


At May 10, 2018, 11:07am, mmurphy replied:

<item name="android:actionModeBackground"> lets you set the background color of the native action mode. I have not used action modes with appcompat-v7 personally; last I checked, they did not support them, forcing you back to the native implementation.

There may be recipes for changing the fonts. I have never changed the fonts in the action bar, let alone in the action mode, and so I do not know the details. From a brief scan of the docs, you might hunt around Stack Overflow or elsewhere for actionModeStyle and actionModeMenuStyle attributes for use in style resources.


At May 10, 2018, 7:04pm, Shahood replied:

worked!

Will check the rest later. For now, that’s enough.

Thanks!