Change the name color of an Android ActionMode

This is my action bar:

enter image description here

You can see the light text "1 selected." I try to change the color with the clock, but I can not find a solution. I also want to change the color of the separator on the right side of the tick image. Any ideas?

My .xml style:

<resources>

<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
    <item name="actionBarStyle">@style/ActionStyle</item>
    <item name="actionBarTabTextStyle">@style/MyTabTextStyle</item>
    <item name="android:actionModeBackground">@drawable/bg_bar</item>
    <item name="android:actionModeCloseDrawable">@drawable/ic_done</item>
</style>

<style name="ActionStyle" parent="Widget.Sherlock.ActionBar">
    <item name="background">@color/action_bar_color</item>
</style>

<style name="MyTabTextStyle" parent="Widget.Sherlock.ActionBar.TabText">
    <item name="android:textColor">#FFFFFF</item>
    <item name="android:textStyle">bold</item>
    <item name="background">@color/action_bar_color</item>
    <item name="android:textSize">14dp</item>
</style>

</resources>
+4
source share
1 answer

Using Actionbar Sherlock and XML, you can use Widget.Sherlock.ActionMode:

<!-- Tell Sherlock to use the customised ActionMode Style --->
<style name="AppBaseTheme" parent="android:Theme.Sherlock.Light.DarkActionBar">
  <item name="android:actionModeStyle">@style/MyActionModeStyle</item>
</style>

<!-- Setup the style of the ActionMode here --->
<style name="MyActionModeStyle" parent="Widget.Sherlock.ActionMode">
    <item name="background">@color/action_bar_color</item>
    <item name="android:titleTextStyle">@android:style/My.ActionMode.Title</item>
</style>

<!-- Setup the text style of the ActionMode here --->
<style name="My.ActionMode.Title">
    <item name="android:textColor">@android:color/white</item>
    <item name="android:textStyle">bold</item>
    <item name="android:shadowColor">@android:color/black</item>
    <item name="android:shadowRadius">1</item>
</style>
+5
source

Source: https://habr.com/ru/post/1543431/


All Articles