Add weightSum="" property to your LinearLayout
so use following and manage it as you want with wiegtSum and layout_weight
also Use LinearLayout instead of <Space>
tag
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:weightSum="3"
android:orientation="horizontal" >
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"/>
<Button
android:id="@+id/button_ok"
style="@style/base_button"
android:layout_width="12dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="OK"/>
<LinearLayout
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"/>
</LinearLayout>