title: set extended ImageView width and height programatically - android
body: <p>I have a custom class that extends ImageView that I'm programatically putting on to a RelativeLayout.  I want each one of these images to be a specific width and height.  I've tried setting the width/height in code with LayoutParams and with setMaxWidth/setMaxHeight...neither seem to be working.</p>
  
  <p>Here is the code from the constructor of the class:</p>
  
  <pre><code>LayoutParams p = new LayoutParams(50,67);       
          this.setLayoutParams(p);
          this.setImageResource(WhichImage(wi));
          this.setMaxWidth(50);
          this.setMaxHeight(67);
  </code></pre>
  
  <p>I've moved the call to setImageResource() above and below everything there and it still defaults to the true image size in my drawables...</p>