title: how to put values of EditText in the dialogue box
body: <p><a href="https://i.stack.imgur.com/XI0we.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XI0we.png" alt="enter image description here"></a></p>
  
  <p>I want to give the output, which was entered by the user in <code>EditText</code>, in a detailed manner in a separate dialog box, by using the values of those entered values in the <code>EditText</code>. Any help will be appreciated.</p>
  
  <p>Ex-when a user enters "abc", it prints only their ascii values in the <code>EditText</code>..now I want these values to be used and the user gets full details of these values in a seperate dialogue box as mentioned in the SAMPLE image...</p>
  
  <p>Here is the code:</p>
  
  <pre><code>    btn2=(Button) findViewById(R.id.btn2);
  
      final EditText editText1 = (EditText) findViewById(R.id.editText);
      final EditText editText2 = (EditText) findViewById(R.id.editText2);
  
      btn1.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
  
              String a = editText1.getText().toString();
              byte b[]=a.getBytes();
              char ch[]=a.toCharArray();
              for(int i=0;i&lt;ch.length;i++)
              {
  
                  editText2.setText(editText2.getText()+" "+String.valueOf(b[i]));
              }
          }
      });
      btn2.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(Ascode.this);
  
  
                  String a;
                  a = editText1.getText().toString();
                  String s[]=a.split("\\s");
                  byte b[]=a.getBytes();
                      char ch[]=a.toCharArray();
  
                      for(int i=0;i&lt;a.length();i++)
                      {
                          s[i] = "Value of: \n"+ch[i]+ "is" +b[i]+"\n";
                      }
  
                      alertDialogBuilder.setTitle("Detailed Output is");
                      alertDialogBuilder.setCancelable(false);
                      alertDialogBuilder.setMessage(String.format(s[i]))
                              .setNeutralButton("Ok", new DialogInterface.OnClickListener() {
                                  public void onClick(DialogInterface dialog, int id) {
                                      dialog.cancel();
                                  }
                              });
  
                      AlertDialog alertDialog = alertDialogBuilder.create();
                      alertDialog.show();
              }
          });
  </code></pre>