Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android AppCompat 22.1.1 default text color and ActionMode style

I am updating my application to use the version 22.1.1 of the Android Support Library. My application theme inherits from Theme.AppCompat.Light.DarkActionBar.

It works fine, except that all texts are white if the TextView style is set to one of the predefined style. So I end up with white texts on light background (default background color). With version 22.0.0, I had no issue.

I tried the follow in my theme, but it does not seem to work:

<item name="android:textColor">@color/black</item>
<item name="android:textColorPrimary">@color/black</item>
<item name="android:textColorPrimaryInverse">@color/black</item>

Moreover, the ActionMode now has a black background instead of white, as it used to be with 22.0.0.

Any idea on how to change this?

like image 284
Gaëtan Avatar asked Apr 28 '15 06:04

Gaëtan


1 Answers

I was using the theme attribute in my theme to set the Toolbar theme. That's a mistake. The Toolbar theme has to be defined on the Toolbar tag directly.

For the ActionMode background color, it looks like I was taking profit of a bug without knowing it.

like image 108
Gaëtan Avatar answered Oct 22 '22 02:10

Gaëtan