1

I am making an Android app in which I show a Dialog Fragment where users can sumbit text. The problem is that the keyboard shows over the dialog and I couldn't find any way to fix it! I've tried doing the following with no luck:

  • Adding the android:windowSoftInputMode attribute in my AndroidManifest.xml with multiple values like "adjustPan|adjustResize"

  • Using dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN); with SOFT_INPUT_STATE_HIDDEN, SOFT_INPUT_ADJUST_RESIZE but that just crushes the content of the dialog.

  • This answer: https://stackoverflow.com/a/51821469/6766678 where the screenshots are what I want to achieve.

This is what my dialog looks like when the keyboard is open: enter image description here

Any help is appreciated!

Toufic Batache
  • 762
  • 10
  • 24

1 Answers1

0

I finally decided using Material Dialogs

Toufic Batache
  • 762
  • 10
  • 24