List of usage examples for android.view Window setType
public void setType(int type)
From source file:com.mumu.joshautomation.HeadService.java
private void showExitConfirmDialog() { AlertDialog.Builder builder = new AlertDialog.Builder( new ContextThemeWrapper(mContext, R.style.MyDialogStyle)) .setTitle(getString(R.string.headservice_stop_title)) .setMessage(getString(R.string.headservice_stop_info)).setPositiveButton( getString(R.string.headservice_stop_button), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { // Let's do some background stuff stopSelf(); }/*from ww w .j ava 2 s.com*/ }) .setNegativeButton(getString(R.string.startup_cancel), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { } }); AlertDialog alert = builder.create(); Window win = alert.getWindow(); if (win != null) win.setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT); alert.show(); }