Answer the question
In order to leave comments, you need to log in
How to change default Dialog template in Android?
Actually, there is AlerDialogBuilder with EditText added to it. I want to specify a minimum number of input characters in an EditText. How to do it? Once again, the dialogue template is standard.
In layout, I indicated android:maxLength = "16"
And in the code there is no such method, and a method that limits the number of minimum characters entered.
Dialog code:
AlertDialog.Builder alert = new AlertDialog.Builder(this);
alert.setTitle("Заголовок");
alert.setMessage("Сообщение");
alert.setCancelable(false);
final EditText input = new EditText(this);
alert.setView(input);
alert.setPositiveButton("ОК", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
adminLogin = input.getText().toString();
}
});
alert.show();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question