title: Need to sum up the total amount and create order summary in another intent/activity
body: <p><a href="https://i.stack.imgur.com/Jyu75.png" rel="nofollow noreferrer">XML LAYOUT SCREENSHOT</a>
  Trying to calculate the final amount of selected items in an another activity. Need to create order summary in another activity.</p>
  
  <p>Tried introducing multiplication function but also need to hard code the quantity values to auto calculate the final amount.</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
  EditText pantqty;
  EditText pantrate;
  TextView result;
  Button SUBMIT;
  
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      pantqty = (EditText) findViewById(R.id.et_pantqty);
      pantrate = (EditText) findViewById(R.id.et_pantrate);
      SUBMIT = (Button) findViewById(R.id.et_submit);
      result = (TextView) findViewById(R.id.et_result);
  
  
      SUBMIT.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
              int q = Integer.valueOf(pantqty.getText().toString());
              float r = Integer.valueOf(pantrate.getText().toString());
              float amount = q * r;
              result.setText(Float.toString(amount));
          }
      });
  
  }
  }
  </code></pre>
  
  <p>Need to create a method in OnCLickListener to calculate the amount from the items selected.can if else case be used on OnclickListerButton?</p>
  
  <p>Thanks for the help.</p>