title: How to retrive all views data from Recyclerview Android at once
body: <p>I have a recyclerview in my android project and in the recyclerview im populating the name of the any items and it have EditText corresponding to every name view inside recyclerview, which means the person can edit the price of each item inside recyclerview.
  Now outside recyclerview i have a button which when clicked a POST request is called and the names and their corresponding prices are updated.
  I can't find a way by which i get all the data from recyclerview back to my fragment.</p>
  <p>My sample code to understand the problem</p>
  <pre><code>public class TestsListAdapterLabsInside extends RecyclerView.Adapter&lt;TestsListAdapterLabs.MyHolder&gt; {
  
          Context context;
          ArrayList&lt;TestListLabRetro&gt; arrayList;
          double[] TOTAL;
  
          public TestsListAdapterLabsInside(Context context, ArrayList&lt;TestListLabRetro&gt; arrayList) {
              this.context = context;
              this.arrayList = arrayList;
              this.TOTAL = new double[arrayList.size()];
          }
  
          @NonNull
          @Override
          public TestsListAdapterLabs.MyHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
              View v = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.recyclerview_test_labs2, viewGroup, false);
  
              return new TestsListAdapterLabs.MyHolder(v);
          }
  
          @Override
          public void onBindViewHolder(@NonNull app.dezignoo.knockadoc.Adapters.TestsListAdapterLabs.MyHolder myHolder, final int i) {
  
              myHolder.name.setText(arrayList.get(i).getName());
              myHolder.slno.setText(String.valueOf(i + 1));
  
              myHolder.price.setText(arrayList.get(i).getPrice());
  
          }
  
          @Override
          public int getItemCount() {
              return arrayList.size();
          }
  
  
          public class MyHolder extends RecyclerView.ViewHolder {
  
              TextView slno, name;
              TextView price;
  
              public MyHolder(View itemView) {
                  super(itemView);
  
                  name = itemView.findViewById(R.id.testName);
                  slno = itemView.findViewById(R.id.slno);
                  price = itemView.findViewById(R.id.testPrice);
              }
          }
  
      }
  </code></pre>
  <p>this Adapter is defined below my fragment.
  I want a final list of all the &lt;name, price&gt; from the recyclerview in my fragment to update to the server.</p>
  <p>Thankyou in advance.</p>