Custom dialog

0

I have a question, as I do when I enter a text in an EditText of a main activity, then I appear in a dialog as a title?

    
asked by andres otalvaro 16.11.2018 в 22:41
source

1 answer

0

You can use an AlertDialog to show the dialogue with the title you want in the following way:

//this es el contexto de tu Activity
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);
alertDialogBuilder.setTitle("AQUI EL TÍTULO QUE QUIERAS");
alertDialogBuilder.setMessage("AQUÍ EL MENSAJE");
alertDialogBuilder.setPositiveButton("Aceptar", null);
alertDialogBuilder.show();

You can get more information in the Android documentation about the Dialogs in this link: Dialog boxes | Android Developers

    
answered by 16.11.2018 / 22:47
source