In order to enter text in a dialog box using EditText, other custom methods are useless:
Dialog Dialog = new Dialog (context);
But this will have a nasty title, so get rid of:
Dialog.requestwindowfeature (Window.feature_no_title);
When customizing the dialog box, it is sometimes necessary to have a full screen width, but some of the activity's topics are problematic, so you need to add:
window window = Dialog.getwindow (); Windowmanager.layoutparams LP = Window.getattributes (); lp.width = WindowManager.LayoutParams.MATCH_PARENT; Window.setattributes (LP);
Some custom dialog boxes that inherit Alertdialog need to be written in the OnCreate () method.
Show soft Keyboard when opening dialog box:
Dialog.getwindow (). Setsoftinputmode (WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
android dialog Box dialog a little bit of a problem