禁止任何按键touch事件对话框

        AlertDialog.Builder disableDlgBuilder = new AlertDialog.Builder(mContext);
        disableDlgBuilder.setTitle(mContext.getString(com.android.internal.R.string.not_globe_sim_title)); //"Invalid  sim"
        disableDlgBuilder.setMessage(mContext.getString(com.android.internal.R.string.pls_input_globe_sim));//"Please insert Globe Sim card in Slot1"
        disableDlgBuilder.setCancelable(false);
        disableDlg = disableDlgBuilder.create();
        disableDlg.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
        disableDlg.show();

你可能感兴趣的:(禁止任何按键touch事件对话框)