frame layout is created using main.xml. Now my requirement is to get the dimension of the frame layout.
I am using getWidth() and getHight() method but i am getting 0 all the time.

main.xml

<?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"
androidrientation="vertical" >

<FrameLayout
android:id="@+id/camera_preview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
>
<View
android:id="@+id/view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
</FrameLayout>

<Button
android:id="@+id/button_capture"
android:text="Capture"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
/>

</LinearLayout>