My application shows a user dialog in front of the lock screen. This is a simple operation that contains DialogFragments (from the support library, since this application runs on 2.2+).
Since the actual activity displaying these dialogs was not a floating window by Android standards,
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
worked fine.
However, I thought that I would use an Activity that looks like Dialog. However, all Dialog themes (Holo, etc.) have this element:
<item name="android:windowIsFloating">true</item>
This for some reason causes the window flag to be completely ignored. Interestingly, the activity is displayed after the user unlocks the screen.
Why is this so, and is there a way around it?
A - C
source share