title: Android Studio - how does setImageDrawable work?
body: <p>I've been trying to teach myself how to use android studio but I've hit a road block, whats wrong with this code? It wont let me use a draw-able to be set as the image?</p>
  
  <pre><code>    public void obama(){
      Switch s = (Switch)findViewById(R.id.obamaswitch);
      s.setOnClickListener(new View.OnClickListener() {
          @Override
                  public void onClick(View v) {
              ImageView p = (ImageView)findViewById(R.id.obamahere);
              p.setImageDrawable(R.drawable.brock);
          }
      });
  }
  </code></pre>