title: How to get the width and height of an android.widget.ImageView?
body: <pre><code>╔══════════════════════════════════════════════╗   ^
  ║ ImageView    ╔══════════════╗                ║   |
  ║              ║              ║                ║   |
  ║              ║ Actual image ║                ║   |
  ║              ║              ║                ║   |60px height of ImageView
  ║              ║              ║                ║   |
  ║              ║              ║                ║   |
  ║              ╚══════════════╝                ║   |
  ╚══════════════════════════════════════════════╝   
  &lt;------------------------------------------------&gt;
                     90px width of ImageView
  </code></pre>
  
  <p>I have an image view with some default height and width, images are stored in db and I want to scale Image according to Imageview height width. As I don't want it give default values because when ever I change it's height and width I also have to change it in code.</p>
  
  <p>I am trying to get the height and width of ImageView but 0 is returned to me in both cases.</p>
  
  <pre><code>int height = ((ImageView) v.findViewById(R.id.img_ItemView)).getHeight();
  </code></pre>
  
  <p>this returns me 0 even it has default height and width</p>