I have a problem with laying out a Relative Layout. Here is the test code
<RelativeLayout
android:background="@drawable/bg_controls"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/controls_layout"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/controls_layout" />
</RelativeLayout>
The result of that is
If I remove android:layout_centerInParent="true" everything works OK. Why does RelativeLayout fails to do that otherwise?
UPD: the intended result is that a second button appears under the LinearLayout.