title: Set ImageView in a static method
body: <p>I have a method that needs to be called from another activity, and I need to use it to set an ImageView in it's own activity. I have this method in MainActivity:</p>
  
  <pre><code>public static void setImageView(String fileName){
          Log.i(TAG, fileName);
          imageView = (ImageView) findViewById(R.id.imageView);
          bmp = BitmapFactory.decodeFile(fileName);
          imageView.setBackgroundResource(0);
          imageView.setImageBitmap(bmp);  
      }
  </code></pre>
  
  <p>But I can't make a static reference to findViewById because it isn't a static method. This method is being called in a Camera Activity after the photo has been saved, I want to pass in the fileName (file URI) and set the imageView such that when the Camera Activity finishes and the user return to the MainActivity the ImageView is already set. As such, in CameraView I am trying to call this:</p>
  
  <pre><code>...code...
  mCamera.takePicture(null, null, callback);
  MainActivity.setImageView(fileName);
  </code></pre>
  
  <p>Is there a cheeky way around this? I know there are other posts on this but I can't quite work out how to apply the advice given there to my situation.</p>
  
  <p>Thanks!</p>