Custom ActionMode in AlertDialog

508 views Asked by At

I spent a few hours to get the same look of ActionMode during selecting text inside Dialog as in eg Fragment. If I select text in Fragment, ActionMode, it looks like it is from from Lollipop if in Dialog like on 4.3.

What is most annoying is that sometimes it is showing normal icons (grey) but sometimes they are white so you don't know what you can click. I don't have more ideas, I tried everything I found:

  1. Custom style of: actionModeStyle
  2. Specified in main style: actionModeBackground (doesn't work any of other options too)
  3. Custom ActionMode.Callback (this one works but is showing under default ActionMode)
  4. Changed theme of context passed to AlertDialog.Builder working but its not same as in eg fragment.

App compiled with API21, target 21, tested on SGS3. Compiling with API20 doesn't change anything, so I don't know how it is possible that ActionMode changed look to new design. S3 works on stock system 4.3.

Screenshots

In fragment
enter image description here

Dialog - with white icons, sometimes they are grey
enter image description here

Dialog - with themedContext passed to Builder
enter image description here

Is it possible to get the same look inside Dialog as is normal in Fragment? Or everywhere as in Dialog? Before one of the last updates I always had ActionMode as on 2nd image, but showing correctly.

0

There are 0 answers