Android AppCompat 22.1.1 default text color and Ac

2019-04-28 22:28发布

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?

1条回答
我只想做你的唯一
2楼-- · 2019-04-28 23:00

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.

查看更多
登录 后发表回答