title: Pass ImageView from one activity to another - Intent - Android
body: <p>I have 170 images in the drawable folder in my android app. I have one activity displaying all of them. What is want to do is to pass the clicked imageview to another activity (Zoom_activity) where the user can zoom it and play around with it. How do I achieve it? </p>
  
  <p>All the images are 500x500px. So I can't think of decoding them into Bitmaps and passing Btmaps via Intent. Please suggest a better and simple way to do it! I have already had a look at the other answers here on SO but none of them solved my problem.</p>
  
  <p>Here is my code: </p>
  
  <p>Activity_1.java</p>
  
  <pre><code>Intent startzoomactivity = new Intent(Activity_one.this, Zoom_Image.class);
  String img_name = name.getText().toString().toLowerCase(); //name is a textview which is in refrence to the imageview.
  startzoomactivity.putExtra("getimage", img_name);
  startActivity(startzoomactivity);
  </code></pre>
  
  <p>Zoom_Activity.java</p>
  
  <pre><code>    Intent startzoomactivity = getIntent();
      String img_res = getIntent().getStringExtra("getimage");
      String img_fin = "R.drawable."+img_res;
      img.setImageResource(Integer.parseInt(img_fin));
  </code></pre>
  
  <p>Error: App force closes</p>
  
  <p>Please help me solve this problem!<br>
  Thanks!</p>