title: How to pass ArrayList from Adapter to activity?
body: <p>I need send ArrayList list_add to activity but I don't know how I can do it if is possible share it on main activity for use it in the future.
  Anyone can help me to implement a method for do it?
  below have MainAdatper for recyclerview where I have a list_add and want passed it to main activity and after I can add it to</p>
  
  <pre><code>class MainAdapter extends RecyclerView.Adapter &lt;MainAdapter.ViewHolder&gt; {
  
      private static int lastCheckedPos = 0;
      ArrayList&lt;String&gt; list_add = new ArrayList&lt;&gt;();
      ArrayList&lt;String&gt; lista_show;
      private Context context;
      String t;    
  
      public MainAdapter(ArrayList&lt;String&gt; lista_shows, Context context) {
          lista_show = lista_shows;
      }
  
      @Override
      public MainAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
          View view = LayoutInflater.from (parent.getContext ()).inflate (R.layout.row,parent,false);
          return new ViewHolder(view);
      }
  
      @Override
      public void onBindViewHolder(final MainAdapter.ViewHolder holder, final int position) {
  
          holder.mdevice.setText (lista_show.get (position));
          holder.cardView.setOnLongClickListener (new View.OnLongClickListener () {
              @Override
              public boolean onLongClick(View v) {
                  t = lista_show.get(position);
                  if (list_add.contains(t)) {
                      Toast.makeText(v.getContext (), t+"Already Selected", Toast.LENGTH_SHORT).show();
                  } else {
                      list_add.add(t);
                      holder.cardView.setCardBackgroundColor(Color.parseColor("#60B5EC"));
                      Toast.makeText(v.getContext (), t+"Added", Toast.LENGTH_SHORT).show();
                  }
                  return true;
              }
          });
  
          holder.cardView.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  t = lista_show.get (position);
                  holder.cardView.setCardBackgroundColor(Color.WHITE);
                  if (! list_add.contains(t)) {
                      Toast.makeText(v.getContext (), "Long press for add", Toast.LENGTH_SHORT).show();
                  } else {
                      list_add.remove(t);
                      Toast.makeText(v.getContext (), t+"Removed", Toast.LENGTH_SHORT).show();
                  }
              }
          });
  
      }
  
      @Override
      public int getItemCount() {
          return lista_show.size ();
      }
  
      public class ViewHolder extends RecyclerView.ViewHolder {
  
          public TextView mdevice;
          CardView cardView;
  
          public ViewHolder( View itemView) {
              super (itemView);
              mdevice = itemView.findViewById (R.id.device);
              cardView = itemView.findViewById (R.id.mcardview);
          }
      }
  }
  </code></pre>