title: how to send image from recyclerview imageview to other activity
body: <p>I have recyclerview with card view. each card contains imageview with one image which is retrieved from firebase database using Picasso.now what I want to do is whenever I clicked on the imageview it will open that image in a new activity.i'm able to open new activity by clicking on imageview.but it not showing the image.</p>
  
  <p>for this I used below code in my adapter class :</p>
  
  <pre><code>public class RecyclerAdapter extends RecyclerView.Adapter&lt;RecyclerAdapter.ViewHolder&gt; {
  
  Context context;
  private List&lt;RecyclerClass&gt;listdata ;
  
  public RecyclerAdapter(Context context, List&lt;StreetClass&gt; list) {
  
      this.listdata = list;
      this.context = context;
  }
  
  @Override
  public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
  
      View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.show_items, parent, false);
      ViewHolder viewHolder = new ViewHolder(view);
      return viewHolder;
  }
  
     public void onBindViewHolder(final ViewHolder holder, int position) {
  
        RecyclerClass Details = listdata.get(position);
        Picasso.with(context).load(Details.getImgurl()).resize(120, 60).into(holder.ImageTextView);
        holder.ImageTextView.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
  
              int position = holder.getAdapterPosition();
              Bundle bundle = new Bundle();
              //add data to your bundle
              bundle.putInt("id", position);
              //create intent
              Intent mainIntent = new Intent(context, ShowImage.class);
              //add bundle to intent
              mainIntent.putExtras(bundle);
              //start activity
              context.startActivity(mainIntent);
  
          }
      });
  </code></pre>
  
  <p>in other class, i used this code but i don't know is it right or wrong</p>
  
  <pre><code>public class ShowImage extends AppCompatActivity {
  
  Context context;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_show_image);
  
      ImageView img = findViewById(R.id.shwimg);
  
      Intent i = getIntent();
      int position = i.getIntExtra("id", 0);
      img.setImageResource(ArrayList.get(position));
  
  }
  }
  </code></pre>
  
  <p>please, help me</p>