Reputation: 671
How can I implement such a dialog, no activity is running.
Is the activity invisible or what?
Upvotes: 0
Views: 310
Reputation: 31
In your dialog you need to set type of Window which dialog attached, as follows:
dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
Do not forget declaring android.permission.SYSTEM_ALERT_WINDOW
permission in your manifest.
Upvotes: 0
Reputation: 1007359
How can I implement such a dialog, no activity is running.
You can't.
Is the activity invisible or what?
Possibly, perhaps using Theme.Translucent.NoTitleBar
.
More likely, what you think is a Dialog
is really a dialog-themed Activity
. The main themes (e.g., Theme.Material
, Theme.AppCompat
) have specific themes with Dialog
in their names that cause the activity's window to not fill the entire screen.
Upvotes: 1