title: Android - Setting an ImageView content from another class
body: <p>Here's the thing:
  I have two classes: Main and control.java 
  the Main class is an Activity class where I build my app and the control class I just use for variables controls that I must access from other classes.</p>
  
  <p>The problem is: In class Main I got 2 methods, and I have an ImageView in each of them, I need to set the image view resource of the second method on a click listener of the first one. Like this:</p>
  
  <pre><code>public void first() {
      final ImageView first = (ImageView) findViewById(R.id.myview);
      first.setBackgroundResource(R.drawable.myimage);
  }
  
  public void second() {
      final ImageView second = (ImageView) findViewById(R.id.myview2);
      //And then, I want something like this: first.setBackgroundResource(first);
  }
  </code></pre>
  
  <p>Thanks guys!</p>