title: Android ImageView return getWidth, getHeight zero
body: <p>I am having problem withh the getWidth / getheight function of ImageView.
  My xml is as follows:</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/bonus_popup"
      android:visibility="gone"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"&gt;
  
      &lt;ImageView
          android:id="@+id/todaybonus"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentTop="true"
          android:adjustViewBounds="true"
          android:src="@drawable/startscreen_todaybonus" /&gt;
      &lt;ImageView android:id="@+id/ok_button"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:onClick="acceptBonus"
          android:background="#000000"&gt;&lt;/ImageView&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>and my code is as follows:</p>
  
  <pre><code>if (isDisplayBonus){
      set_blur_background();
      bonusPopup.setVisibility(0);
      Log.i(TAG, "Bonus width: " + todayBonus.getWidth());
      Log.i(TAG, "Bonus height: " + todayBonus.getHeight());
  }
  </code></pre>
  
  <p>Please help me solve this proble,. Thank you in advance.</p>