title: How to send data using putExtra of the an Adapter Class to a new Activity
body: <p>I have a problem to send data using putExtra (of the a Adapter Class to an new Activity). I think that my problem is in Parcelable, but I cannot find where there are the problem.</p>
  
  <p>Follow my class for you understand better.</p>
  
  <p>Consultorio.class</p>
  
  <pre><code>   public class Consultorio implements Parcelable {
  
          private String nome;
          private int photo;
  
       public Consultorio() {
        }
  
      * @param nome
      * @param photo
      public Consultorio( String nome, int Photo)) {
  
         this.nome =  nome;
         this.photo = photo;
  
      }
  
     /**
     * @return
     */
     public String getNome() {
       return nome;
     }
  
     /**
     * @param nome
     */
     public void setNome(String nome) {
         this.nome = nome;
     }
  
     public int getPhoto() {
        return photo;
     }
  
     public void setPhoto(int photo) {
         this.photo = photo;
     }
  
     //PARCELABLE
     public Consultorio(Parcel parcel){
         setNome(parcel.readString());
         setPhoto(parcel.readInt());
     }
  
     @Override
     public int describeContents() {
         return 0;
     }
  
     @Override
     public void writeToParcel(Parcel dest, int flags) {
         dest.writeInt(photo);
         dest.writeString(nome);
  
     }
  
     public static final Parcelable.Creator CREATOR = new   Parcelable.Creator&lt;Consultorio&gt;() {
         @Override
         public Consultorio createFromParcel(Parcel source) {
             return new Consultorio(source);
         }
  
         @Override
         public Consultorio[] newArray(int size) {
             return new Consultorio[size];
         }
     };
  
     public void readFromParcel(Parcel in) {
       nome = in.readString();
       photo = in.readInt();
          }
  }
  </code></pre>
  
  <p>Follow My Class Fragment (because I'm using TabLayout)</p>
  
  <pre><code>   public class ClinicaMedicaFragment extends Fragment {
  
        private List&lt;Consultorio&gt; consultorioList = new ArrayList&lt;Consultorio&gt;();
        private ClinicaAdapter adapter;
        private Toolbar toolbar;
  
        @Override
        public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View v =inflater.inflate(R.layout.clinica_medica_fragment, container, false);
  
        RecyclerView recyclerView = (RecyclerView) v.findViewById(R.id.clinica_recyclerView);
        toolbar = (Toolbar) v.findViewById(R.id.tb_main);
  
        GridLayoutManager manager = new GridLayoutManager(v.getContext(),
               2, GridLayoutManager.VERTICAL, false);
        manager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
           @Override
           public int getSpanSize(int position) {
               return (position % 3 == 0 ? 2 : 1);
           }
       });
       recyclerView.setLayoutManager(manager);
  
       List&lt;Consultorio&gt; list = new ArrayList&lt;Consultorio&gt;();
       Consultorio c0 = new Consultorio();
       c0.setPhoto(R.mipmap.img1);
       c0.setNome("Name 1");
  
       Consultorio c1 = new Consultorio();
       c1.setPhoto(R.mipmap.img2);
       c1.setNome("Name 2");
  
       Consultorio c2 = new Consultorio();
       c2.setPhoto(R.mipmap.img3);
       c2.setNome("Name 3");
  
      list.add(c0);
      list.add(c1);
      list.add(c2);
  
      consultorioList = list;
  
      adapter = new ClinicaAdapter(list);
      recyclerView.setAdapter(adapter);
      return v;
  }
  </code></pre>
  
  <p>Follow My CLASS Adapter (in this class I'm using putExtra for send datato an new Activity)</p>
  
  <pre><code>   public class ClinicaAdapter extends RecyclerView.Adapter&lt;ClinicaAdapter.ViewHolder&gt;{
  private List&lt;Consultorio&gt; consultorioList;
  //protected Boolean isHomeList = false;
  
  
       public ClinicaAdapter(List&lt;Consultorio&gt; data) {
        consultorioList = data;
       }
  
       @Override
       public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
       View itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.clinica_medica_item, parent, false);
       return new ViewHolder(itemView);
     }
  
     @Override
     public void onBindViewHolder(final ViewHolder holder, final int position) {
  
        final Consultorio consultorio = consultorioList.get(position);
        holder.imageViewPhoto.setImageResource(consultorio.getPhoto());
  
        holder.imageViewPhoto.setOnClickListener(new View.OnClickListener(){
             @Override
             public void onClick(View view) {
                 Intent intent = new Intent(view.getContext(), ClinicaActivity.class);
                 intent.putExtra("consultorio", consultorio);
                 view.getContext().startActivity(intent);
             }
         });
      }
  
      @Override
      public int getItemCount() {
        return consultorioList.size();
      }
  
      public class ViewHolder extends RecyclerView.ViewHolder {
  
          ImageView imageViewPhoto;
  
          public ViewHolder(View itemView) {
          super(itemView);
          imageViewPhoto = (ImageView) itemView.findViewById(R.id.clinc_img);
      }
  }
  </code></pre>
  
  <p>Inmy Class Activity I pick up information by</p>
  
  <pre><code> Consultorio mConsultorio;
  
   mConsultorio = getIntent().getParcelableExtra("consultorio");
  </code></pre>