Is there a way to prevent the keyboard appear automatically when dialog is showing up.
here is my code for my dialog box
final Dialog dialog = new Dialog(this);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(R.layout.shopping_cart_confirm_dialog);
TextView txtConfirmEmail = (TextView)dialog.findViewById(R.id.txtConfirmEmail);
...
dialog.show();
Thanks a lot.
Try this
dialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With