Android:About the width of the widget in RelativeLayout
<p>I wrote the following xml:</p>

<pre><code>    &lt;RelativeLayout&gt;
    &lt;LinearLayout&gt;
    ......//widgets
    &lt;/LinearLayout&gt;
    &lt;ImageView
 android:id="@+id/img"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:src="@drawable/pic"
/&gt;
    &lt;/RelativeLayout&gt;
</code></pre>

<p>And in code I wanna get the width of the <strong>img</strong>.But always get <strong>0</strong>.
Why?
Thanks in advance!
PS:Im sorry I have forgoten to add <code>android:src="..."</code>;But it still 0!</p>
