Android 如何使用alertDialog.Builder显示自定义键盘?

Android 如何使用alertDialog.Builder显示自定义键盘?,android,android-alertdialog,android-softkeyboard,custom-keyboard,Android,Android Alertdialog,Android Softkeyboard,Custom Keyboard,我需要显示带有alertDialog和editText的自定义键盘 我正在使用AlertDialog.Builder创建新的AlertDialog 一段时间后,我可以禁用默认键盘,但我仍然无法显示自己的自定义键盘 以下是我代码的一部分: AlertDialog.Builder builder = new AlertDialog.Builder(mActivity); builder.setView(view); builder.setTitle(mActivit

我需要显示带有alertDialog和editText的自定义键盘

我正在使用AlertDialog.Builder创建新的AlertDialog

一段时间后,我可以禁用默认键盘,但我仍然无法显示自己的自定义键盘

以下是我代码的一部分:

AlertDialog.Builder builder = new AlertDialog.Builder(mActivity);

        builder.setView(view);
        builder.setTitle(mActivity.getString(R.string.title));
        builder.setMessage(mActivity.getString(R.string.message));
builder.setNegativeButton(mActivity.getString(R.string.negative),
                new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {

                    }
                });
        builder.setPositiveButton(R.string.positive,
                new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {

                    }
                });
        mDialog = builder.create();
mDialog.show();

mDialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
Keyboard_Digits kd = new Keyboard_Digits
                .Builder(mActivity, keboardView)
                .build();
        kd.showCustomKeyboard(mEditText);
此代码打开我的自定义键盘,但在对话框窗口下。。。。(

知道如何解决这个问题吗?

使用弹出窗口

PopupWindow popup;
final View custom = LayoutInflater.from(context)
.inflate(R.layout.popup_layout, new FrameLayout(context));
popup = new PopupWindow(context);
对于自定义软键盘来说,该对话框不是一个好选项