Android 对话框打开时在选项卡之间移动

Android 对话框打开时在选项卡之间移动,android,dialog,Android,Dialog,我的应用程序中有5个选项卡。但当对话框在当前片段中打开时,我无法在选项卡之间移动,因为对话框显示在选项卡上方。如果有人有解决方案,请提供帮助。谢谢..我的对话框代码如下所示: public static final void showDialog(Context context, String title, String message) { final Dialog dialog = new Dialog(context, R.style.MyDialo

我的应用程序中有5个选项卡。但当对话框在当前片段中打开时,我无法在选项卡之间移动,因为对话框显示在选项卡上方。如果有人有解决方案,请提供帮助。谢谢..我的对话框代码如下所示:

public static final void showDialog(Context context, String title,
            String message) {
        final Dialog dialog = new Dialog(context, R.style.MyDialogTheme);
        dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);

        dialog.setContentView(R.layout.dialog_description);

        TextView text_Title = (TextView) dialog
                .findViewById(R.id.text_desc_title1);
        TextView text_Desc = (TextView) dialog
                .findViewById(R.id.text_desc_main1);
        Button btn_delete = (Button) dialog
                .findViewById(R.id.button_delete_dialog);
        text_Title.setText(title);
        text_Desc.setMovementMethod(new ScrollingMovementMethod());
        text_Desc.setText(Html.fromHtml(message));

        btn_delete.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {
                // TODO Auto-generated method stub
                dialog.dismiss();
            }
        });

        dialog.show();

    }

只要显示
对话框
,我认为您就无法访问背景项。请使用弹出窗口而不是对话框。因为作为popupwindow行为,您可以在弹出窗口外触摸,popupwindow将自动关闭您在弹出窗口外的触摸。原因是,现在setFocus()属性当前依赖于alertDialog,因此,唯一的方法是更改焦点,如果更改焦点,alertDialog将消失,,根据我的想法,当焦点位于alertDialog时,切换选项卡是不可能的