A
A
Artem Voronov2015-02-20 20:30:09
Android
Artem Voronov, 2015-02-20 20:30:09

How to find the cause of incorrect behavior of Contextual action bar?

The problem is that in Genymotion, Samsung GT-I8730 and Sony - Xperia Z3 the contextual action bar is displayed correctly:
9e2e19b92c3a4684956287c37b331ff6.png
And on Samsung Galaxy Note 2 and S4 it stretches to full screen:
6151a7b7d3b64f2ab83ae16e420a99f1.png
Has anyone encountered such a problem? In which direction to dig?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem Voronov, 2015-03-12
@newross

I found the reason on Stackoverflow - a bug with the action mode style in some Samsung firmware. The solution from the link did not work, but I managed to defeat the bug as follows:
Created a basic style

<style name="Widget.ActionMode">
<item name="android:background">?android:attr/actionModeBackground</item>
<item name="android:backgroundSplit">?android:attr/actionModeSplitBackground</item>
<item name="android:height">?android:attr/actionBarSize</item>
<item name="android:titleTextStyle">@android:style/TextAppearance.Widget.ActionMode.Title</item>
<item name="android:subtitleTextStyle">@android:style/TextAppearance.Widget.ActionMode.Subtitle</item>
</style>

And inherited its ActionMode style from it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question