title: How to put values from an activity in Textview which is in another activity
body: <p>I've 2 activities <code>Acivity 1</code> and <code>Activity 2</code>. I'm passing values from <code>Activity 1</code> to <code>Activity 2</code>. Code is given below:<br>
  <strong><code>Activity 1</code></strong>  </p>
  
  <pre><code>@Override
      protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
  Intent intent = new Intent(Activity1.this, Activity2.class);
                      intent.putExtra("accountName", hashMaps.get(i).get("accountNumber"));
                      intent.putExtra("accountNumber", hashMaps.get(i).get("accountName"));
  
  }  
  </code></pre>
  
  <p><strong><code>Activity 2</code></strong>  </p>
  
  <pre><code>    @Override
          protected void onCreate(Bundle savedInstanceState) { 
  super.onCreate(savedInstanceState);
          setContentView(R.layout.layout_expand_collapse);
      Bundle b1 = getIntent().getExtras();
              if (b1 != null) {
                  String accountName = b1.getString("accountName");
                  String accountNumber = b1.getString("accountNumber");
                  Log.d(Tag, "Values are " + accountName);
                  Log.d(Tag, "Values are " + accountNumber);
              }
      } 
  </code></pre>
  
  <p>Here is the AsyncTask code:  </p>
  
  <pre><code>private class getData extends AsyncTask&lt;Void, Void, HashMap&lt;String, String&gt;&gt; {
  
          @Override
          protected void onPreExecute() {
              super.onPreExecute();
              pDialog = new ProgressDialog(CardViewExpandCollapse.this);
              pDialog.setMessage("Please wait...");
              pDialog.setCancelable(false);
              pDialog.show();
          }
  
          @Override
          protected HashMap&lt;String, String&gt; doInBackground(Void... voids) {
  
              HttpHandler httpHandler = new HttpHandler();
  
              String s = httpHandler.makeServiceCall(mUrl);
  
              Gson gson = new Gson();
              AccountDetail[] accountDetails = gson.fromJson(s, AccountDetail[].class);
  
              ArrayList&lt;AccountDetail&gt; details = new ArrayList&lt;&gt;(Arrays.asList(accountDetails));
  
              HashMap&lt;String, String&gt; accDetails = new HashMap&lt;&gt;();
  
              String address = details.get(0).getRow().getBillToAddress();
  
              Double balance = details.get(0).getRow().getTotalAccountBalance();
  
              Double invoices = details.get(0).getRow().getTotalOpenInvoicesValue();
  
              Log.e(Tag, "Response from URL " + s);
  
              accDetails.put("billToAddress", address);
              accDetails.put("totalAccountBalance", balance + "\tUSD");
              accDetails.put("totalOpenInvoicesValue", invoices + "\tUSD");
  
              hashMap.add(accDetails); // size = 3
  
              return accDetails;
          }
  
          @Override
          protected void onPostExecute(HashMap&lt;String, String&gt; accDetails ) {
              super.onPostExecute(accDetails );
              if (pDialog.isShowing()) {
                  pDialog.dismiss();
              }
  
              /*accnumber = (TextView) findViewById(R.id.txt_acc_num1);
              accname = (TextView) findViewById(R.id.txt_acc_name1);
              address = (TextView) findViewById(R.id.txt_address1);
              totalaccbal = (TextView) findViewById(R.id.txt_total_acc_bal_value1);
              openinvoice = (TextView) findViewById(R.id.txt_open_invoices_value1);*/
  
              Log.e(Tag, "Address is " + address);
  //            Log.e(Tag, "Balance is " + balance);
  //            Log.e(Tag, "Invoice is " + invoices);
  
              /*I want values of getExtras() added to TextView here*/
  
  
              address.setText(accDetails.get("billToAddress"));
              totalaccbal.setText(accDetails.get("totalAccountBalance"));
              openinvoice.setText(accDetails.get("totalOpenInvoicesValue"));
  
          }
      }
  </code></pre>
  
  <p>Above codes are working fine. There are some TextViews in <code>Activity 2</code>. I want to put <code>accountName</code> and <code>accountNumber</code> in those TextViews in onPostExecute() method. How can I do that?<br>
  i.e., I want values of getExtras() to be added to TextView in <code>onPostExecute()</code> method. How can I do that?</p>