Display ActionMode over Toolbar

Since you are using the Toolbar, I also assume you are using the AppCompatActivity and have replaced the built in ActionBar with your custom Toolbar using setSupportActionBar(toolbar); First of all ensure you are importing the correct namespace: import androidx.appcompat.view.ActionMode; // Or import android.support.v7.view.ActionMode; and NOT import android.view.ActionMode; then use _actionMode = startSupportActionMode(this); and NOT _actionMode … Read more

How to change ActionMode background color in Android

In my case i resolved with this. First i created a style to define the actionModeBackground: <style name=”MyTheme.ActionMode” parent=”@android:style/Theme.Holo.Light”> <item name=”android:actionModeBackground”>#FFFFFF</item> </style> Then i add the style into my base application theme: <style name=”AppTheme” parent=”AppBaseTheme”> <item name=”android:actionModeStyle”>@style/MyTheme.ActionMode</item> </style> Hope it helps!!!

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 … Read more