title: Override onMeasure after getting ImageView by Id
body: <p>I need to find a view by id and then override its <code>onMeasure</code> method. Does anyone know how to do that?</p>
  
  <p>The following will not work in Java, but conceptually it's what I need:</p>
  
  <pre><code>ImageView myImage = (ImageView) findViewById(R.id.some_pic);
  myImage.onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
    super.onMeasure(widthMeasureSpec, heightMeasureSpec);
    int width = MeasureSpec.getSize(widthMeasureSpec);
    int height = MeasureSpec.getSize(heightMeasureSpec);
      showOther(width, height);
  };
  
  myImage.setImageBitmap(bmp);
  </code></pre>
  
  <p>Java offers this</p>
  
  <pre><code>ImageView myImage = new ImageView(this) {
    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
      super.onMeasure(widthMeasureSpec, heightMeasureSpec);
      int width = MeasureSpec.getSize(widthMeasureSpec);
      int height = MeasureSpec.getSize(heightMeasureSpec);
      showOther(width, height);               }
  };
  </code></pre>
  
  <p>or this</p>
  
  <pre><code>ImageView myImage. = (ImageView) findViewById(R.id.some_pic);
  myImage.setImageBitmap(bmp);
  </code></pre>
  
  <p>I thought of using <code>setOnMeasureListener</code> but no such method is defined for ImageView. Any thoughts on how to get this going?</p>