How do I get the window height when I'm inside a surface view
This is my layout: (The surface view has already the LinearLayout "camera_preview" passed to it.
Now the question is how do I get the Window layout, which is identical to the FrameLayout ?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal" >
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:layout_weight="1" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:layout_gravity="center"
android:id="@+id/camera_preview">
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="50dp"
android:background="#999999"
android:gravity="top|center_horizontal"
android:id="@+id/top_cover">
</LinearLayout>
<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">
<Button
android:id="@+id/button_capture"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Capture" />
</LinearLayout>
</FrameLayout>
</LinearLayout>