0

I need to show custom keyboard with alertDialog with editText;

I am using AlertDialog.Builder for creating new alertDialog.

After some time i can disable default keyboard, but i still can't show my own custom one...

here is some part of my code:

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);

this code open my custom keyboard, but is under dialog window.... (

any idea how to fix this?

Stan Malcolm
  • 2,740
  • 5
  • 32
  • 53

1 Answers1

0

use PopupWindow.

PopupWindow popup;
final View custom = LayoutInflater.from(context)
.inflate(R.layout.popup_layout, new FrameLayout(context));
popup = new PopupWindow(context);

The dialog it's not a good option for custom soft keyboards.

Ricardo A.
  • 685
  • 2
  • 8
  • 35