title: How to set an image of an ImageView that's not in your contentView?
body: <p>I can't seem to set the <code>ImageView</code> from a different layout. In the class below, I use one layout that has an <code>ImageView</code>, and I can set that <code>ImageView</code> to the image picked by the user from the gallery perfectly. But when I set an <code>ImageView</code> that's not in my <code>setContentView</code> I keep getting a <code>NullPointerException</code> error.
  Is there anyway workaround for this? I tried using <code>BitmapUtility</code> and that doesn't work either. Help please!</p>
  
  <pre><code>@Override
  public void onCreate(Bundle savedInstanceState)
  {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.card_create_layout);
  }
  
  private void grabImage()
  {
      Intent imageGetter = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
      startActivityForResult(imageGetter, RESULT_LOAD_IMAGE);
  
  }
  
  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data)
  {
      super.onActivityResult(requestCode, resultCode, data);
      if(requestCode == RESULT_LOAD_IMAGE &amp;&amp; resultCode == RESULT_OK &amp;&amp; null != data)
      {
          Uri selectedImage = data.getData();
          String[] filePathColumn = {MediaStore.Images.Media.DATA};//Array size of 1, and we put in a string
          Cursor cursor = getContentResolver().query(selectedImage, filePathColumn, null, null, null);
          cursor.moveToFirst();
          int columnIndex = cursor.getColumnIndex(filePathColumn[0]);
          user_image_path = cursor.getString(columnIndex);//here we have our image path.
          cursor.close();
  
  
          ImageView imageView = (ImageView) findViewById(R.id.imageView);
          imageView.setImageBitmap(BitmapFactory.decodeFile(user_image_path));//THIS WORKS PERFECTLY FINE, because, R.id.imageView is in the R.layout.card_create_layout (above).
  
         ImageView v = (ImageView) findViewById(R.id.maxCard);
          v.setImageBitmap(BitmapFactory.decodeFile(user_image_path));
          //NOW THIS DOESN'T WORK, I KEEP GETTING NULL POINT EXCEPTION, because R.id.maxCard(which is another ImageView in another layoutfile).
      }
  }
  
  
  @Override
  public void onClick(View v)
  {
      switch (v.getId())
      {
          case R.id.theCreateButton:
              grabImage();
              break;
      }
   }
  </code></pre>