title: getting values inputs from dynamically created editTexts
body: <p>I have created a LinearLayout with 4 Inputs of string and double data type with two buttons(Add More, and Proceed).</p>
  
  <p>When i click on the AddMore Button, and another set of input fields is added below the first one according to how many times it is clicked,(I'VE DONE THIS)</p>
  
  <p>When i click on the Proceed button,
  * I want to get values supplied on the dynamic fields according to the number of times the views are added below. and i want to make calculations together with the first 4 fields and then pass these values to the next activity for further processing</p>
  
  <p>The dynamic fields</p>
  
  <pre><code>&lt;EditText
      android:id="@+id/product_name_main"
      android:layout_width="match_parent"
      android:layout_height="55dp"
      android:layout_marginStart="16dp"
      android:layout_marginLeft="16dp"
      android:layout_marginTop="24dp"
      android:layout_marginEnd="16dp"
      android:layout_marginRight="16dp"
      android:hint="Product Name"
      android:inputType="text"
      android:paddingStart="20dp"
      android:paddingLeft="20dp"
      android:paddingTop="10dp"
      android:paddingEnd="10dp"
      android:paddingRight="10dp"
      android:paddingBottom="10dp"
      android:textSize="14sp" /&gt;
  
  &lt;EditText
      android:id="@+id/product_number_main"
      android:layout_width="match_parent"
      android:layout_height="55dp"
      android:layout_marginStart="16dp"
      android:layout_marginLeft="16dp"
      android:layout_marginTop="24dp"
      android:layout_marginEnd="16dp"
      android:layout_marginRight="16dp"
  
      android:ems="10"
      android:hint="Product Number"
      android:inputType="number"
      android:paddingStart="20dp"
      android:paddingLeft="20dp"
      android:paddingTop="10dp"
      android:paddingEnd="10dp"
      android:paddingRight="10dp"
      android:paddingBottom="10dp"
      android:textSize="14sp" /&gt;
  
  &lt;EditText
      android:id="@+id/product_price_main"
      android:layout_width="match_parent"
      android:layout_height="55dp"
      android:layout_marginStart="16dp"
      android:layout_marginLeft="16dp"
      android:layout_marginTop="24dp"
      android:layout_marginEnd="16dp"
      android:layout_marginRight="16dp"
  
      android:ems="10"
      android:hint="Product Price"
      android:inputType="number"
      android:paddingStart="20dp"
      android:paddingLeft="20dp"
      android:paddingTop="10dp"
      android:paddingEnd="10dp"
      android:paddingRight="10dp"
      android:paddingBottom="10dp"
      android:textSize="14sp" /&gt;
  
  &lt;EditText
      android:id="@+id/product_quantity_main"
      android:layout_width="match_parent"
      android:layout_height="55dp"
      android:layout_marginStart="16dp"
      android:layout_marginLeft="16dp"
      android:layout_marginTop="24dp"
      android:layout_marginEnd="16dp"
      android:layout_marginRight="16dp"
  
      android:ems="10"
      android:hint="Product Quantity"
      android:inputType="number"
      android:paddingStart="20dp"
      android:paddingLeft="20dp"
      android:paddingTop="10dp"
      android:paddingEnd="10dp"
      android:paddingRight="10dp"
      android:paddingBottom="10dp"
      android:textSize="14sp" /&gt;
  </code></pre>
  
  <p>The Proceed Button</p>
  
  <pre><code>public void btnProceed(View view) {
  
      Intent intent = new Intent(view.getContext(), DisplayActivity.class);
  
  
      // ******** making sure the inputs gets values before proceeding to 
      the next phase
      if(productName.getText().length() == 0) {
          Toast.makeText(this, "You need to fill out the fields to 
          continue", Toast.LENGTH_LONG).show();
      } else if(productNumber.getText().length() ==0) {
          Toast.makeText(this, "fill out the second field to continue", 
          Toast.LENGTH_LONG).show();
      }else if (productPrice.getText().length() == 0) {
          Toast.makeText(this, "Please fill out the third field", 
          Toast.LENGTH_LONG).show();
      }else if (productQuantity.getText().length() == 0) {
          Toast.makeText(this, "Please fill out the last field", 
          Toast.LENGTH_LONG).show();
      }else{
          // getting text from the user using the standard fields
          pName = productName.getText().toString();
          pNumber = Double.parseDouble(productNumber.getText().toString());
          pPrice = Double.parseDouble(productPrice.getText().toString());
          pQuantity = 
          Double.parseDouble(productQuantity.getText().toString());
  
          //for the dynamically added textViews
          SharedPreferences.Editor editor = 
          getPreferences(Context.MODE_PRIVATE).edit();
          for (EditText editText : allEds) {
              editor.putString("key" + editText.getTag().toString(), 
              editText.getText().toString());
          }
          editor.commit();
  
          ArrayList&lt;String&gt; allTexts = new ArrayList&lt;&gt;();
          for (EditText e : allEds) {
              allTexts.add(e.getText().toString());
  
          }
  
          //sending the standard recieved texts to the next activity
          intent.putExtra("name", pName);
          intent.putExtra("number", pNumber);
          intent.putExtra("price", pPrice);
          intent.putExtra("quantity", pQuantity);
  
          //sending the dynamically received values
          intent.putExtra("Text", (Serializable) allTexts);
          startActivity(intent);
          finish();
  
      }
  }
  </code></pre>
  
  <p>*EDITED *</p>
  
  <p>THE ADD MORE BUTTON</p>
  
  <pre><code>public void onAddField(View view) {
      LayoutInflater inflater = (LayoutInflater) 
      getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      final View rowView = inflater.inflate(R.layout.field, null);
      //adding the new row before the add field button.
      parentLinearLayout.addView(rowView, parentLinearLayout.getChildCount() - 
      1);
  }
  </code></pre>
  
  <p>THE RECEIVING ACTIVITY</p>
  
  <pre><code>    productName = findViewById(R.id.product_name_main);
      productNumber = findViewById(R.id.product_number_main);
      productPrice = findViewById(R.id.product_price_main);
      productQuality = findViewById(R.id.product_quantity_main);
  
      //GETTING THE DYNAMIC DATA
      others = findViewById(R.id.other_items);
      Intent collectDynamicData = getIntent();
      ArrayList &lt;String&gt; allTexts = (ArrayList&lt;String&gt;) 
      collectDynamicData.getSerializableExtra("text");
      others.setText((CharSequence) allTexts);
  
  
      //getting the first items from the first activity
      getName = getIntent().getExtras().getString("name");
      getNumber = getIntent().getExtras().getDouble("number");
      getPrice = getIntent().getExtras().getDouble("price");
      getQuantity = getIntent().getExtras().getDouble("quantity");
  
      //formatting the numbers
      DecimalFormat formate = new DecimalFormat();
      String resultNumber, resultPrice, resultQuantity;
      resultNumber = formate.format(getNumber);
      resultPrice = formate.format(getPrice);
      resultQuantity = formate.format(getQuantity);
  
  
      //SETTING THE OUTPUT
      productName.setText(getName);
      productNumber.setText(resultNumber);
      productPrice.setText(resultPrice);
      productQuality.setText(resultQuantity);
  }
  </code></pre>
  
  <p>I expected that will send all the input data to the next activity, but it only sent the data from the first four (4) input fields which is not dynamic and it didn't send the dynamic data</p>