title: Getting value of EditText in Activity from ListView
body: <p>My LisiViewAdapter Class is this</p>
  
  <pre><code>public class ListViewAdapter3 extends BaseAdapter {
  Activity context;
  
  String productCode[];
  String productName[];
  String productType[];
  String productPrice[];
  String lastFourOrder[];
  String productId[];
  
  public ListViewAdapter3(Activity context, String productCode[],
          String productName[], String productType[], String productPrice[],
          String lastFourOrder[], String productId[]) {
      super();
      this.context = context;
      this.productCode = productCode;
      this.productName = productName;
      this.productType = productType;
      this.productPrice = productPrice;
      this.lastFourOrder = lastFourOrder;
      this.productId = productId;
  }
  
  public int getCount() {
      // TODO Auto-generated method stub
      return productName.length;
  }
  
  public Object getItem(int position) {
      // TODO Auto-generated method stub
      return null;
  }
  
  public long getItemId(int position) {
      // TODO Auto-generated method stub
      return 0;
  }
  
  private class ViewHolder {
      TextView tvproductname;
      TextView tvproducttype;
      TextView tvproductunit;
      TextView tvproductprice;
      TextView tvproductorder;
      ImageView ivup1;
      ImageView ivdown1;
      EditText stepper_display;
      int defaultNumber = 0;
  }
  
  public View getView(final int position, View convertView, ViewGroup parent) {
      // TODO Auto-generated method stub
      final ViewHolder holder;
  
      LayoutInflater inflater = context.getLayoutInflater();
  
      if (convertView == null) {
          convertView = inflater.inflate(R.layout.collection2, null);
          holder = new ViewHolder();
          convertView.setTag(holder);
      } else {
          holder = (ViewHolder) convertView.getTag();
  
      }
  
      holder.tvproductname = (TextView) convertView
              .findViewById(R.id.tvproduct);
      holder.tvproducttype = (TextView) convertView
              .findViewById(R.id.tvprodtype);
      holder.tvproductunit = (TextView) convertView
              .findViewById(R.id.tvprodunit);
      holder.tvproductprice = (TextView) convertView
              .findViewById(R.id.tvprice);
      holder.tvproductorder = (TextView) convertView.findViewById(R.id.tvL40);
      holder.ivup1 = (ImageView) convertView.findViewById(R.id.ivup1);
      holder.ivdown1 = (ImageView) convertView.findViewById(R.id.ivdown1);
      holder.stepper_display = (EditText) convertView
              .findViewById(R.id.etorderqty);
      holder.stepper_display.setText("" + holder.defaultNumber);
  
      holder.ivup1.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
  
              String s = holder.stepper_display.getText().toString();
              if (s.equals("0")) {
                  holder.defaultNumber = 0;
                  holder.defaultNumber++;
              } else {
                  // decrem_btn.setClickable(true);
                  holder.defaultNumber++;
              }
              holder.ivdown1.setClickable(true);
  
              String currentValue = Integer.toString(holder.defaultNumber);
  
              holder.stepper_display.setText(currentValue);
  
          }
      });
  
      holder.ivdown1.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
  
              String s = holder.stepper_display.getText().toString();
              // System.out.println("s=====" + s);
              if (s.equals("0")) {
                  // System.out.println("ffffffffffffffffffffffffffff");
                  holder.ivdown1.setClickable(false);
                  holder.defaultNumber = 0;
              } else {
                  // decrem_btn.setClickable(true);
                  holder.defaultNumber--;
              }
  
              if (holder.defaultNumber == 0) {
                  holder.ivdown1.setClickable(false);
              }
              String currentValue = Integer.toString(holder.defaultNumber);
  
              holder.stepper_display.setText(currentValue);
          }
      });
  
      holder.tvproductname.setText(productName[position]);
      holder.tvproducttype.setText(productType[position]);
      holder.tvproductunit.setText("");
      holder.tvproductprice.setText(productPrice[position]);
      holder.tvproductorder.setText(lastFourOrder[position]);
      return convertView;
      }
  }
  </code></pre>
  
  <p>In my Activity class I am getting the value of EditText</p>
  
  <pre><code>for (int i = 0; i &lt; list.getAdapter().getCount(); i++) {
          View view = list.getChildAt(i);
          EditText editText = (EditText) view.findViewById(R.id.etorderqty);
          System.out.println(i+" A:"+editText.getText().toString());
          } 
  </code></pre>
  
  <p>Size of list is five. But I am not getting data from all the EditText I am getting only four values of edit Text. Not getting last value. Please Help. </p>