How can I display a dialog above the keyboard

Have you tried ths one?

Worked for me:

http://developer.android.com/reference/android/view/Window.html#setSoftInputMode(int).

alertDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);

You may need to set dialog's width and height manually in order to make soft input mode work like this:

    WindowManager.LayoutParams params = window.getAttributes();
    params.width = WindowManager.LayoutParams.MATCH_PARENT;
    params.height = WindowManager.LayoutParams.MATCH_PARENT;
    params.gravity = Gravity.CENTER;
    window.setAttributes(params); 
    window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE ); 

Tags:

Android