title: getHeight returns 0 for all Android UI objects
body: <p>I'm building a UI, and it's all static defined in the XML. All of it has weights all over the place, and while it looks right, I wanted to see that things actually have the right height and all. The problem is that no matter where I call .getHeight() for my format layout I got 0. I tried in both onCreate() and onStart(). Same thing. Happens for all UI objects too. Any idea?</p>
  
  <pre><code>package com.app.conekta;
  
  import android.app.Activity;
  import android.os.Bundle;
  import android.util.Log;
  import android.view.Window;
  import android.widget.Button;
  import android.widget.FrameLayout;
  import android.widget.Toast;
  
  public class Conekta extends Activity {
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          requestWindowFeature(Window.FEATURE_NO_TITLE);
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
  
      }
  
      @Override
      public void onStart() {
  
          super.onStart();
  
  
      }
  
      @Override
      public void onResume() {
          super.onResume();
  
          FrameLayout fl1 = (FrameLayout) findViewById(R.id.headerFrameLayout);
          FrameLayout fl2 = (FrameLayout) findViewById(R.id.footerFrameLayout);
          Button b=(Button) findViewById(R.id.searchButton);
  
          Log.d("CONEKTA", String.valueOf(b.getHeight()));
  
      }
  }
  </code></pre>
  
  <p>XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical" &gt;
  
  
  
      &lt;FrameLayout
          android:id="@+id/headerFrameLayout"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_weight="0.05"
          android:background="#597eAA" &gt;
  
          &lt;ImageView
              android:id="@+id/logoImage"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:background="#7ba1d1"
              android:src="@drawable/logo_conekta" /&gt;
      &lt;/FrameLayout&gt;
  
      &lt;LinearLayout
          android:id="@+id/bodyLinearLayout"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_weight="0.7"
          android:background="#f3f3f3"
          android:orientation="horizontal" &gt;
  
          &lt;FrameLayout
              android:id="@+id/leftBlankFrameLayout"
              android:layout_width="wrap_content"
              android:layout_height="fill_parent"
              android:layout_weight="0.15"
              android:background="#f3f3f3" &gt;
          &lt;/FrameLayout&gt;
  
          &lt;LinearLayout
              android:id="@+id/centerVerticalLayout"
              android:layout_width="wrap_content"
              android:layout_height="fill_parent"
              android:layout_weight="0.7"
              android:orientation="vertical" &gt;
  
              &lt;FrameLayout
                  android:id="@+id/topCenterFrameLayout"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:layout_weight="0.35" &gt;
              &lt;/FrameLayout&gt;
  
              &lt;TextView
                  android:id="@+id/venueLabel"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_weight="0.025"
                  android:text="What are you looking for?"
                  android:textAppearance="?android:attr/textAppearanceMedium"
                  android:textColor="#000000" /&gt;
  
              &lt;EditText
                  android:id="@+id/venueTextField"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:layout_weight="0.025" &gt;
  
                  &lt;requestFocus /&gt;
              &lt;/EditText&gt;
  
              &lt;FrameLayout
                  android:id="@+id/middleCenterFrameLayout"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:layout_weight="0.05" &gt;
              &lt;/FrameLayout&gt;
  
              &lt;TextView
                  android:id="@+id/locationLabel"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_weight="0.025"
                  android:text="Where?"
                  android:textAppearance="?android:attr/textAppearanceMedium"
                  android:textColor="#000000" /&gt;
  
              &lt;AutoCompleteTextView
                  android:id="@+id/locationTextField"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:layout_weight="0.025"
                  android:text="" /&gt;
  
              &lt;LinearLayout
                  android:id="@+id/buttonLinearLayout"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:layout_weight="0.05"
                  android:background="#f3f3f3"
                  android:orientation="horizontal" &gt;
  
                  &lt;FrameLayout
                      android:id="@+id/leftButtonLinearLayout"
                      android:layout_width="wrap_content"
                      android:layout_height="fill_parent"
                      android:layout_weight="0.1" &gt;
                  &lt;/FrameLayout&gt;
  
                  &lt;Button
                      android:id="@+id/searchButton"
                      android:layout_width="wrap_content"
                      android:layout_height="fill_parent"
                      android:layout_weight="0.8"
                      android:background="#6fa8dc"
                      android:text="Search" /&gt;
  
                  &lt;FrameLayout
                      android:id="@+id/rightButtonLinearLayout"
                      android:layout_width="wrap_content"
                      android:layout_height="fill_parent"
                      android:layout_weight="0.1" &gt;
                  &lt;/FrameLayout&gt;
              &lt;/LinearLayout&gt;
  
              &lt;FrameLayout
                  android:id="@+id/bottomCenterFrameLayout"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:layout_weight="0.35" &gt;
              &lt;/FrameLayout&gt;
          &lt;/LinearLayout&gt;
  
          &lt;FrameLayout
              android:id="@+id/rightBlankFrameLayout"
              android:layout_width="wrap_content"
              android:layout_height="fill_parent"
              android:layout_weight="0.15"
              android:background="#f3f3f3" &gt;
          &lt;/FrameLayout&gt;
      &lt;/LinearLayout&gt;
  
      &lt;FrameLayout
          android:id="@+id/footerFrameLayout"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_weight="0.15"
          android:background="#7ba1d1" &gt;
      &lt;/FrameLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>