title: How can I get the real size of drawable in android?
body: <p>hi there I have an <code>ImageView</code> that contains a <code>Drawable</code> , I want to know the real size of this <code>Drawable</code> ( width and height ) . how can I get the real size please?</p>
  <p>I tried that but its not working:</p>
  <pre><code>final ImageView img = (ImageView) findViewById(R.id.imagePlan);
  img.setImageResource(R.drawable.gratuit);
  System.out.println(&quot;w==&quot;+img.getDrawable().getIntrinsicWidth()+&quot; h==&quot;+img.getDrawable().getIntrinsicHeight());
  </code></pre>
  <p>thanks</p>