title: getMeasuredHeight() of FrameLayout will return 0 First Time in android
body: <p>final FrameLayout layout = (FrameLayout) findViewById(R.id.main_view);</p>
  
  <pre><code>ViewTreeObserver vto = layout.getViewTreeObserver();
      vto.addOnGlobalLayoutListener(new OnGlobalLayoutListener() {
          public void onGlobalLayout() {
              layout.getViewTreeObserver().removeGlobalOnLayoutListener(this);
              XMAX = layout.getMeasuredWidth();
              YMAX = layout.getMeasuredHeight();
  
              System.out.println("==== The Y Max Is : " + (YMAX));
          }
      });
  </code></pre>