title: How to get window height from inside SurfaceView?
body: <p>How do I get the window height when I'm inside a surface view</p>
  
  <p>This is my layout:  (The surface view has already the LinearLayout "camera_preview" passed to it.</p>
  
  <p>Now the question is how do I get the Window layout, which is identical to the FrameLayout ?</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="horizontal" &gt;
  
      &lt;FrameLayout
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:layout_gravity="center"
          android:layout_weight="1" &gt;
  
          &lt;LinearLayout
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:gravity="center"
          android:layout_gravity="center"
          android:id="@+id/camera_preview"&gt;            
          &lt;/LinearLayout&gt;
  
  
          &lt;LinearLayout
          android:layout_width="fill_parent"
          android:layout_height="50dp"        
          android:background="#999999"
          android:gravity="top|center_horizontal"
          android:id="@+id/top_cover"&gt;            
          &lt;/LinearLayout&gt;
  
  
          &lt;LinearLayout
              android:background="#999999"    
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:layout_gravity="bottom|center_horizontal"
              android:layout_marginRight="0dp"
              android:layout_marginTop="0dp"
              android:padding="10dp"
              android:id="@+id/bottom_cover"
              android:gravity="center"&gt;
              &lt;Button
                  android:id="@+id/button_capture"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center"
                  android:text="Capture" /&gt;
          &lt;/LinearLayout&gt;
      &lt;/FrameLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>