Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Select text toolbar options color issue

I'm facing this weird problem with the bar that appears when you select a text

enter image description here

I'm using Appcompat v7 library the last version. This is my theme defenition:

<style name="AppTheme.Base" parent="Theme.AppCompat.Light">
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>

    <item name="colorControlNormal">@color/material_blue_grey_800</item>
    <item name="colorControlActivated">@color/colorAccent</item>
    <item name="colorControlHighlight">@color/colorPrimary</item>

    <item name="android:windowNoTitle">true</item>
    <item name="windowActionBar">false</item>

    <item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
    <item name="vpiTabPageIndicatorStyle">@style/TabStyle</item>

    <item name="android:textAppearanceButton">@style/AppTheme.ButtonTextAppearance</item>
    <item name="android:textViewStyle">@style/MyTextViewStyle</item>
</style>

<style name="MyTextViewStyle" parent="android:Widget.TextView">
    <item name="android:textColor">@color/text</item>
    <item name="android:textColorLink">@color/colorPrimary</item>
</style>

<style name="AppTheme.ButtonTextAppearance" parent="@style/Base.TextAppearance.AppCompat.Button">
    <item name="textAllCaps">false</item>
    <item name="android:textAllCaps">false</item>
</style>

None of the colors are white, so I don't really know where it comes this white bar color and white icons.

Any clue?

like image 464
Marcel Avatar asked Sep 29 '22 01:09

Marcel


1 Answers

In order to make the text selection actionMode background color, use the below in your style:

<item name="windowActionModeOverlay">true</item>
<item name="actionModeBackground">@color/dodgerblue</item>
like image 84
Saadi Avatar answered Oct 05 '22 08:10

Saadi