Warpzit
Warpzit

Reputation: 28162

Android startSupportActionMode breaks in appcompat 22.0.0

In the newest appcompat v 22.0.0 startSupportActionMode() breaks. The only thing needed for breaking it is simply updating which library is used. The functionality still works but the view is just all white.

Using startSupportActionMode with following gradle build: compile "com.android.support:appcompat-v7:21.0.+"

Gives following results: actionmode working as it should

But with gradle build: compile 'com.android.support:appcompat-v7:22.0.0'

I get following: actionmode failing

Upvotes: 3

Views: 761

Answers (1)

Manuel
Manuel

Reputation: 821

I had the same problem. In my case, it was enough to overwrite a appcompat style in the app theme:

<!-- Theme -->
<style name="Theme.Custom" parent="Theme.AppCompat.Light.DarkActionBar">
    <item name="actionModeBackground">@color/my_custom_color</item>
</style>

Hope this helps. Please note, that there is no android: prefix in the item name. This is important!

Upvotes: 4

Related Questions