Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to get the specified Product name in EditText box?
    primarykey
    data
    text
    <p>I am developing an android application. In that application I have some variety of products. When user clicks on any product it will show images of the product. In that page only I have one Button like Enquiry. When user clicks on that it will open a form page . In that form I have one field Product name. After completing this when user clicks on submit the details has been mailed to admin mail .</p> <p>What I want is when user clicks on Enquiry Button it should open a form page with auto filled product name .</p> <p>Here is my code.</p> <p>Lenovo.java:</p> <pre><code> Button order = (Button) findViewById(R.id.order); order.setOnClickListener(new OnClickListener(){ public void onClick(View view){ Intent intentmenu = new Intent(view.getContext(),Order.class); startActivityForResult(intentmenu,0); } }); } </code></pre> <p><strong>Order.java:</strong></p> <pre><code> final EditText name = (EditText)findViewById(R.id.username); final EditText mail = (EditText)findViewById(R.id.email); final EditText phone = (EditText)findViewById(R.id.phone); final EditText product = (EditText)findViewById(R.id.product); final String _name = name.getText().toString(); final String _mail = mail.getText().toString(); final String _phone = phone.getText().toString(); final String _product = product.getText().toString(); System.out.println(_name); System.out.println(_mail); System.out.println(_phone); System.out.println(_product); Button email = (Button) findViewById(R.id.Button01); email.setOnClickListener(new OnClickListener(){ public void onClick(View v){ StringBuilder body = new StringBuilder(); body.append("Name: "+name.getText().toString()); body.append("\n\n\nMail: "+mail.getText().toString()); body.append("\n\n\nPhone: "+phone.getText().toString()); body.append("\n\n\nProduct: "+product.getText().toString()); Intent i = new Intent(android.content.Intent.ACTION_SEND); i.setType("text/plain"); i.putExtra(Intent.EXTRA_EMAIL ,new String[] {"b.gadwantikar1@gmail.com","",}); i.putExtra(android.content.Intent.EXTRA_SUBJECT, "Customer Details"); i.putExtra(android.content.Intent.EXTRA_TEXT, body.toString()); startActivity(i); finish(); } }); } } </code></pre> <p>If any body knows then help me out...</p> <p>Thanks in Advance...</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload