dialog with edittext android

Solutions on MaxInterview for dialog with edittext android by the best coders in the world

showing results for - "dialog with edittext android"
Beccy
10 Nov 2016
1 AlertDialog.Builder alertDialog = new AlertDialog.Builder(MainActivity.this);
2 alertDialog.setTitle("PASSWORD");
3 alertDialog.setMessage("Enter Password");
4
5 final EditText input = new EditText(MainActivity.this);
6 LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
7     LinearLayout.LayoutParams.MATCH_PARENT,
8     LinearLayout.LayoutParams.MATCH_PARENT);
9 input.setLayoutParams(lp);
10 alertDialog.setView(input);
11 alertDialog.setIcon(R.drawable.key);
12
13 alertDialog.setPositiveButton("YES",
14     new DialogInterface.OnClickListener() {
15         public void onClick(DialogInterface dialog, int which) {
16             password = input.getText().toString();
17             if (password.compareTo("") == 0) {
18                 if (pass.equals(password)) {
19                     Toast.makeText(getApplicationContext(),
20                         "Password Matched", Toast.LENGTH_SHORT).show();
21                     Intent myIntent1 = new Intent(view.getContext(),
22                         Show.class);
23                     startActivityForResult(myIntent1, 0);
24                 } else {
25                     Toast.makeText(getApplicationContext(),
26                         "Wrong Password!", Toast.LENGTH_SHORT).show();
27                 }
28             }
29         }
30     });
31
32 alertDialog.setNegativeButton("NO",
33     new DialogInterface.OnClickListener() {
34         public void onClick(DialogInterface dialog, int which) {
35             dialog.cancel();
36         }
37     });
38
39 alertDialog.show();
40 }
41
42 });
43
Leny
19 Jun 2017
1final View view = layoutInflater.inflate(R.layout.xml_file_created_above, null);
2AlertDialog alertDialog = new AlertDialog.Builder(ct).create();
3alertDialog.setTitle("Your Title Here");
4alertDialog.setIcon("Icon id here");
5alertDialog.setCancelable(false);
6Constant.alertDialog.setMessage("Your Message Here");
7
8
9final EditText etComments = (EditText) view.findViewById(R.id.etComments);
10
11alertDialog.setButton(AlertDialog.BUTTON_POSITIVE, "OK", new OnClickListener() {
12    @Override
13    public void onClick(DialogInterface dialog, int which) {
14
15    }
16});
17
18
19alertDialog.setButton(AlertDialog.BUTTON_NEGATIVE, "Cancel", new OnClickListener() {
20    @Override
21    public void onClick(DialogInterface dialog, int which) {
22        alertDialog.dismiss()
23    }
24});
25
26
27alertDialog.setView(view);
28alertDialog.show();
queries leading to this page
dialog interface edittext android studioshow dialog view with edittext androidmaterial dialog with edittext androiddialog interface edittext androidandroid alertdialog with edittextcustom dialog edittext androidinput edittext in android dialogshow dialog with edittextin androidandroid dialog in a input text layoutandroid alertdialog edittextalert dialog with edittext androidandroid studio dialog box with edittextdialog with edittext androiddesigning a dialog in android studio with input textalert dialog with edit text in androidandroid text input dialogopen a dialog with edit text in android studioandroid dialog with text inputopen dialog with edit text code in android edittext custom dialog in androidcustom edittext library 3a popup picker dialog in androidandroid how to get edit text passing to dialogandroid dialog with multiple edittextedittext dialog box in android studio tutorialdialog with edittext android studiocustom dialog with edittext in android 2020android studio make dialog box with several edittexthow to show edittext alertdialog in androidread edittext value android from alertdialogedittext in dialog androiddialog with edittext in androidpopup dialog with edittext in androidhow to show in edit text info from alert dialog in androidedittext dialog androidalert dialog edittext androidandroid dialog into a input text layoutcreate a edit text in alert dialog androidhow to access edittext in alertdialog androidcustom dialog with edittext in androidedittext alertdialog androidandroid studio alertdialog with edittextshow dialog with edit text androidhow to set focus on edittext in androidandroid studio show dialog with edittextandroid studio alertdialog edittexthow to populate edittext of dialog in androidandroid popup dialog with edittextedit text alert dialog library androidalertdialog android edittextdialog text input androidandroid studio dialog edittextalert dialog box with edittext in android exampleshow a dialog with textfield androidandroid edittext click open dialogandroid dialog opening and focusing on an edittext 3fandroid dialog with edittextandroid show dialog with edit textdialogfragment with edittext android keyboardedittext in alertdialog androidhow to create dialog box with edittext in androiddialog text in android studioinput text dialog androidgetting edittext from til in android dialog 3fdialog with edittext android