title: How do you get the width and height of a surface view
body: <p>I am developing a game.I have drawn images on a surface view which is residing in a relative layout.I want that my game's look and feel should be the same in all resolutions. 
           So now i want to measure the surfaceview/canva's width and height so that I can launch the images in proper proportion rather than hard coded values. But I am unable to retrieve the height and width so please help me.</p>
  
  <pre><code>  I tried canvas.getWidth() and all but it returns 0.
  </code></pre>