SetSoftInputMode for dialogue so as not to hide EditText during input?

I have a custom dialog that has an EditText at the bottom of the view. When I select EditText, the keyboard appears, but hides the EditText in the dialog box.

I know that you can use windowSoftInputMode for activity, and Reference says that you can use Window.setSoftInputMode () for non-activity .. But how to do this ???

Link

I tried to do this. The keyboard will appear without clicking on EditText

But after

Dialog.show ();

i posted

GetWindow () setSoftInputMode (WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE) ;.

But nothing works. Help thanks

+4
source share
1 answer

Try this instead:

dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN); 
+9
source

All Articles