Get width of linear/relative layout?
<p>Is it possible to get the width of a linear/relative layout, if the layout_width is set to fill_parent in the layout xml? For example, I have the following layout xml. Is it possible to find the width of the cameraSourceScreen? Thanks in advance :)</p>

<pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/CameraSourcesScreen"
&gt;

&lt;LinearLayout android:id="@+id/button_bar"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:background="@drawable/topbar"
android:orientation="horizontal"
android:gravity="center"&gt;

&lt;LinearLayout android:layout_height="wrap_content"
  android:layout_width="fill_parent"
  android:orientation="horizontal" android:paddingLeft="20dp"&gt;

        &lt;common.view.ToggleButton android:id="@+id/Near_Toggle"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginRight="2dp"
          android:layout_alignParentLeft="true"
          android:layout_centerVertical="true" android:text="@string/NEAR_STR"
          android:textSize="18px" android:width="130dp"/&gt;

  &lt;common.view.ToggleButton android:id="@+id/Far_Toggle"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginRight="2dp"
          android:layout_alignParentLeft="true"
          android:layout_centerVertical="true" android:text="@string/FAR_STR"
            android:textSize="18px" android:width="130dp"/&gt;

&lt;/LinearLayout&gt; &lt;/LinearLayout&gt; &lt;/RelativeLayout&gt;
</code></pre>
