SystemUIDialogpublic class SystemUIDialog extends android.app.AlertDialog Base class for dialogs that should appear over panels and keyguard. |
Fields Summary |
---|
private final android.content.Context | mContext |
Constructors Summary |
---|
public SystemUIDialog(android.content.Context context)
super(context, R.style.Theme_SystemUI_Dialog);
mContext = context;
getWindow().setType(WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM
| WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
WindowManager.LayoutParams attrs = getWindow().getAttributes();
attrs.setTitle(getClass().getSimpleName());
getWindow().setAttributes(attrs);
|
Methods Summary |
---|
public void | setMessage(int resId)
setMessage(mContext.getString(resId));
| public void | setNegativeButton(int resId, OnClickListener onClick)
setButton(BUTTON_NEGATIVE, mContext.getString(resId), onClick);
| public void | setPositiveButton(int resId, OnClickListener onClick)
setButton(BUTTON_POSITIVE, mContext.getString(resId), onClick);
| public void | setShowForAllUsers(boolean show)
if (show) {
getWindow().getAttributes().privateFlags |=
WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS;
} else {
getWindow().getAttributes().privateFlags &=
~WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS;
}
|
|