when using AlertDialog.Builder with EditText, the Soft Keyboard doesn't pop

前端 未结 12 1329
一生所求
一生所求 2020-11-30 23:13

I am using AlertDialog.Builder in order to create an input box, with EditText as the input method.

Unfortunately, the Soft Keyboard doesn\'t pop, al

12条回答
  •  时光说笑
    2020-11-30 23:40

    A much better solution is given here.

    dialog.getWindow().clearFlags(
             WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
            |WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
    

    No workaround. EditText behaves as expected.

提交回复
热议问题