title: How can i get the all value of Recyclerview on Button click?
body: <pre><code>public class MainActivity extends Activity implements 
  
  GetDataContract.View,RecyclerItemClickListener {
  
      private Presenter mPresenter;
  
      RecyclerView recyclerView;
  
      LinearLayoutManager linearLayoutManager;
  
      CountryAdapter countryAdapter;
  
      EditText etEnterName;
  
      Button btAddItem;
  
      List&lt;CountryRes&gt; allCountriesEditValue;
  
      List&lt;CountryRes&gt; allCountriesData;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
  
          super.onCreate(savedInstanceState);
  
          setContentView(R.layout.activity_main);
  
          getView();
      }
  
      private void getView() {
  
          /*presentator */
          mPresenter = new Presenter(this);
  
          /*initiliaze of id*/
  
          recyclerView = (RecyclerView) findViewById(R.id.recycler);
  
          etEnterName = (EditText) findViewById(R.id.etEnterName);
  
          btAddItem = (Button) findViewById(R.id.btAddItem);
  
          linearLayoutManager = new LinearLayoutManager(this);
  
          /*initiliaze the arraylist*/
  
          allCountriesData=new ArrayList&lt;&gt;();
  
          recyclerView.setLayoutManager(linearLayoutManager);
  
          btAddItem.setOnClickListener(new AddButtonClick());
      }
  
      @Override
  
      public void onGetDataFailure(String message) {
  
          Log.d("Status", message);
      }
  
  
      @Override
      public void onGetDataSuccess(String message, List&lt;CountryRes&gt; 
  allCountriesData) {
  
          /*add the value mannulay*/
  
          CountryRes countryRes = new CountryRes();
  
          countryRes.setName(etEnterName.getText().toString());
  
          allCountriesData.add(countryRes);
          countryAdapter = new CountryAdapter(getApplicationContext(),
  
          allCountriesData, (RecyclerItemClickListener) this);
  
          recyclerView.setAdapter(countryAdapter);
  
          /*set the data in the room*/
          AppDataBase database = AppDataBase.getAppDatabase(this);
  
          DataGenerator.with(database).generateCats(allCountriesData);
  
          Logger.displayCatsInLog(database.catDao().loadAll());
  
          countryAdapter.notifyDataSetChanged();
  
  
      }
  
      /*on item click*/
      @Override
      public void onDashBoardItemClick(String pos) {
  
          Bundle bundle = new Bundle();
  
          bundle.putString("TABVALUE", pos);
  
          Intent intent = new Intent(getApplicationContext(), 
  
          DynamicTabsActivity.class);
  
          intent.putExtras(bundle);
  
          startActivity(intent);
              }
  
      private class AddButtonClick implements View.OnClickListener {
  
          @Override
  
          public void onClick(View view) {
  
              mPresenter.getDataFromURL(getApplicationContext(), "");
  
          }
      }
  
  
  }
  </code></pre>
  
  <p><strong>class adapter</strong></p>
  
  <pre><code> public class CountryAdapter extends
  
      RecyclerView.Adapter&lt;CountryAdapter.MyViewHolder&gt; {
  
          private Context context;
  
          private List&lt;CountryRes&gt; list = new ArrayList&lt;&gt;();
  
          private List&lt;CountryRes&gt; list_edit = new ArrayList&lt;&gt;();
  
          private RecyclerItemClickListener onRecyclerItemClickListener;
  
  
          public CountryAdapter(Context context, List&lt;CountryRes&gt; list, 
  
      RecyclerItemClickListener onRecyclerItemClickListener) {
  
              this.context = context;
  
              this.list = list;
  
              this.onRecyclerItemClickListener = onRecyclerItemClickListener;
  
  
          }
  
          @Override
  
          public CountryAdapter.MyViewHolder onCreateViewHolder(ViewGroup parent,
  
      int viewType) {
  
              View layoutView;
  
              layoutView = 
  
      LayoutInflater.from(parent.getContext()).inflate(R.layout.card_item, parent,
  
      false);
              return new FooterViewHolder(layoutView, 
  
      onRecyclerItemClickListener);
  
          }
  
          @Override
  
          public void onBindViewHolder(CountryAdapter.MyViewHolder holder, int 
  
      position) {
  
              holder.tvCountryName.setText(list.get(position).getName());
  
          }
  
          @Override
  
          public int getItemCount() {
  
              return list.size();
          }
  
          public class MyViewHolder extends RecyclerView.ViewHolder {
  
              TextView tvCountryName;
  
              LinearLayout llListItem;
  
              public MyViewHolder(View itemView) {
  
                  super(itemView);
  
                  tvCountryName = (TextView) 
  
      itemView.findViewById(R.id.tv_country_name);
  
                  llListItem = (LinearLayout) 
  
      itemView.findViewById(R.id.llListItem);
  
              }
          }
  
          private class FooterViewHolder extends MyViewHolder {
  
              public FooterViewHolder(View layoutView, final 
  
      RecyclerItemClickListener onRecyclerItemClickListener) {
  
                  super(layoutView);
  
                  llListItem.setOnClickListener(new View.OnClickListener() {
  
                      @Override
  
                      public void onClick(View v) {
  
                          if (onRecyclerItemClickListener != null) {
  
                              onRecyclerItemClickListener.onDashBoardItemClick(tvCountryName.getText().toS
  
      tring());
  
                          }
                      }
  
                  });
  
              }
  
          }
  
      }
  </code></pre>
  
  <p><strong>Interface</strong></p>
  
  <pre><code>    public interface RecyclerItemClickListener {
  
          void onDashBoardItemClick(String pos);
      }
  </code></pre>