title: Pass Data from Dialog to new Activity
body: <p>I am trying pass data from my dialog box to a new Activity. So basically what i want to do for example in my Dialog box i have <code>Name: John</code>, when i click on my okay button it opens a new activity but i want that <code>John</code> to be set in my <code>edit box</code> on my new activity: </p>
  
  <p>Here is my Activity where my Dialog box code is:</p>
  
  <pre><code> list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
  
  
  
          @Override
          public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {
              /** To change selected state view */
              view.setSelected(true);
              HashMap&lt;String, Object&gt; obj = (HashMap&lt;String, Object&gt;) ADAhere.getItem(position);
              String SlectedName = (String) obj.get("NAME");
              String SlectedPrice = (String) obj.get("PRICE");
              String SlectedSize = (String) obj.get("SIZE");
              String SlectedRange = (String) obj.get("RANGE");
              String SlectedSupp = (String) obj.get("SUPPLIER");
             // Toast.makeText(getActivity().getApplicationContext(), SlectedName, Toast.LENGTH_SHORT).show();
  
              final Dialog dialog = new Dialog(getActivity());
              dialog.getWindow();
              //dialog.setTitle("Confirm your Vote");
              dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
              dialog.setContentView(R.layout.diaglog);
  
              final TextView VName = (TextView) dialog.findViewById(R.id.Name);
              final TextView VRange = (TextView) dialog.findViewById(R.id.Range);
              final TextView VSUPPLIER = (TextView) dialog.findViewById(R.id.Supplier);
              final TextView VSIZE = (TextView) dialog.findViewById(R.id.Size);
              final TextView VPrice = (TextView) dialog.findViewById(R.id.Price);
  
  
              VName.setText(SlectedName);
              VRange.setText(SlectedRange);
              VSUPPLIER.setText(SlectedSupp);
              VSIZE.setText(SlectedSize);
              VPrice.setText(SlectedPrice);
              dialog.show();
              Button cancelBtn = (Button) dialog.findViewById(R.id.cancel_btn);
              cancelBtn.setOnClickListener(new View.OnClickListener() {
  
                  @Override
                  public void onClick(View v) {
                      // TODO Auto-generated method stub
                      dialog.dismiss();
                  }
              });
              Button UpdateBtn = (Button) dialog.findViewById(R.id.btn_update);
              UpdateBtn.setOnClickListener(new View.OnClickListener() {
                  @Override
                  public void onClick(View v) {
                      Intent i = new Intent(getActivity().getApplicationContext(),Upvalence.class);
                      startActivity(i);
                  }
              });
              Button deleteBtn = (Button) dialog.findViewById(R.id.btn_delete);
              deleteBtn.setOnClickListener(new View.OnClickListener() {
                  @Override
                  public void onClick(View v) {
                      Intent i = new Intent(getActivity().getApplicationContext(),Upvalence.class);
                      startActivity(i);
                  }
              });
  
  
              dialog.show();
  
          }
      });
  </code></pre>
  
  <p>so i want to pass <code>VName.setText(SlectedName);</code> to a new activity:</p>
  
  <pre><code> name1.setText(dialogactivityname);
  </code></pre>