title: how to get all editext's value from ListItems in android and pass them to api
body: <p>I have made an activity in that one ListView is ther,In that ListView each listItem is having an editText named "qty",which can be edited,one textView is there which displays "price",I need is when i edit the edittext and if the entered value is more than some limi the textView value will change,After that i have to pass them as a parameter to an api as below:</p>
  
  <pre><code>http://yehki.epagestore.in/app_api/updateCart.php?customer_id=41&amp;product_id=30&amp;quantity=90&amp;product_id=23&amp;quantity=90
  </code></pre>
  
  <p>from that i will get subtotal's of eact item and have to set them to each item in the list,can anyone please help me for it?My code is as below..Please help me save my life...thank you</p>
  
  <p><strong>main.java</strong></p>
  
  <pre><code>   package com.epe.yehki.ui;
  
  import java.util.ArrayList;
  import java.util.HashMap;
  
  import org.json.JSONArray;
  import org.json.JSONException;
  import org.json.JSONObject;
  
  import android.app.Activity;
  import android.app.ProgressDialog;
  import android.content.Intent;
  import android.graphics.Bitmap;
  import android.os.AsyncTask;
  import android.os.Bundle;
  import android.util.Log;
  import android.view.View;
  import android.view.View.OnClickListener;
  import android.view.Window;
  import android.view.WindowManager;
  import android.widget.Adapter;
  import android.widget.AdapterView;
  import android.widget.AdapterView.OnItemClickListener;
  import android.widget.ImageView;
  import android.widget.ListView;
  import android.widget.TextView;
  
  import com.epe.yehki.adapter.CartAdapter;
  import com.epe.yehki.backend.BackendAPIService;
  import com.epe.yehki.util.Const;
  import com.epe.yehki.util.Pref;
  import com.example.yehki.R;
  
  public class CartListActivity extends Activity {
      private ProgressDialog pDialog;
      Intent in = null;
      ListView lv;
      JSONObject jsonObj;
      ArrayList&lt;HashMap&lt;String, String&gt;&gt; cartList;
      Bitmap bitmap;;
      private CartAdapter cartContent;
      JSONArray carts = null;
      ImageView back;
      TextView tv_place_order, tv_home;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          requestWindowFeature(Window.FEATURE_NO_TITLE);
          getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
          setContentView(R.layout.activity_cart_list);
          lv = (ListView) findViewById(R.id.cart_list);
          back = (ImageView) findViewById(R.id.iv_bak);
          tv_place_order = (TextView) findViewById(R.id.tv_place_order);
          tv_home = (TextView) findViewById(R.id.tv_home);
          cartList = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();
          back.setOnClickListener(new OnClickListener() {
  
              @Override
              public void onClick(View v) {
                  finish();
              }
          });
  
          // execute the cartList api()...........!!!!
          new GetCartList().execute();
          // listView ClickEvent
          lv.setOnItemClickListener(new OnItemClickListener() {
  
              @Override
              public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {
                  lv.removeViewAt(position);
                  cartContent.notifyDataSetChanged();
              }
          });
          tv_home.setOnClickListener(new OnClickListener() {
  
              @Override
              public void onClick(View v) {
                  in = new Intent(CartListActivity.this, HomeActivity.class);
                  startActivity(in);
              }
          });
          tv_place_order.setOnClickListener(new OnClickListener() {
  
              @Override
              public void onClick(View v) {
  
              }
          });
      }
  
      /*
       * CART LIST PRODUCT LIST...............!!!!!!!!!
       */
      private class GetCartList extends AsyncTask&lt;Void, Void, Void&gt; {
  
          @Override
          protected void onPreExecute() {
              super.onPreExecute();
              // Showing progress dialog
              pDialog = new ProgressDialog(CartListActivity.this);
              pDialog.setMessage("Please wait...");
              pDialog.setCancelable(false);
              pDialog.show();
  
          }
  
          @Override
          protected Void doInBackground(Void... arg0) {
              // Creating service handler class instance
              String cartUrl = Const.API_CART_LIST + "?customer_id=" + Pref.getValue(CartListActivity.this, Const.PREF_CUSTOMER_ID, "");
              BackendAPIService sh = new BackendAPIService();
              // Making a request to url and getting response
              String jsonStr = sh.makeServiceCall(cartUrl, BackendAPIService.GET);
  
              Log.d("Response: ", "&gt; " + jsonStr);
              try {
                  if (jsonStr != null) {
  
                      jsonObj = new JSONObject(jsonStr);
  
                      // Getting JSON Array node
                      if (jsonObj.has(Const.TAG_PRO_LIST)) {
  
                          carts = jsonObj.getJSONArray(Const.TAG_PRO_LIST);
                          if (carts != null &amp;&amp; carts.length() != 0) {
                              // looping through All Contacts
  
                              for (int i = 0; i &lt; carts.length(); i++) {
                                  JSONObject c = carts.getJSONObject(i);
  
                                  String proId = c.getString(Const.TAG_PRODUCT_ID);
                                  String proName = c.getString(Const.TAG_PRODUCT_NAME);
                                  String wPrice = c.getString(Const.TAG_WHOLESALE_PRICE);
                                  String rPrice = c.getString(Const.TAG_RETAIL_PRICE);
                                  String qty = c.getString(Const.TAG_QUANTITY);
                                  String proimg = Const.API_HOST + "/" + c.getString(Const.TAG_PRODUCT_IMG);
                                  HashMap&lt;String, String&gt; cartProduct = new HashMap&lt;String, String&gt;();
  
                                  cartProduct.put(Const.TAG_PRODUCT_ID, proId);
                                  cartProduct.put(Const.TAG_PRODUCT_NAME, proName);
                                  cartProduct.put(Const.TAG_PRODUCT_IMG, proimg);
                                  cartProduct.put(Const.TAG_WHOLESALE_PRICE, wPrice);
                                  cartProduct.put(Const.TAG_RETAIL_PRICE, rPrice);
                                  cartProduct.put(Const.TAG_QUANTITY, qty);
  
                                  cartList.add(cartProduct);
  
                              }
                          }
                      }
  
                  } else {
                      Log.e("ServiceHandler", "Couldn't get any data from the url");
                  }
  
              } catch (JSONException e) {
                  e.printStackTrace();
                  System.out.println("::::::::::::::::::got an error::::::::::::");
              }
              return null;
          }
  
          @Override
          protected void onPostExecute(Void result) {
              super.onPostExecute(result);
              // Dismiss the progress dialog
              if (pDialog.isShowing())
                  pDialog.dismiss();
              /**
               * Updating parsed JSON data into ListView
               * 
               * */
  
              cartContent = new CartAdapter(CartListActivity.this, cartList);
              lv.setAdapter(cartContent);
  
          }
  
      }
  }
  </code></pre>