
I can not control the height LinearLayout. They will not be aligned correctly and will not fill the width. I want the divider to be in the center and both buttons on both sides. Here is my code:
<LinearLayout
android:id="@+id/buttonFieldsLayout"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/loginFieldsLayout" >
<Button
android:id="@+id/signUpButton"
style="@style/AuthButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/sign_up_button_label" />
<View
android:id="@+id/buttonDivider"
android:layout_width="1dp"
android:layout_height="wrap_content"
android:background="@drawable/divider" />
<Button
android:id="@+id/cancelButton"
style="@style/AuthButton"
android:text="@string/cancel_button_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
divider.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval" >
<gradient
android:startColor="@color/white"
android:centerColor="@color/blue"
android:endColor="@color/white" />
</shape>
Update 1:
View still sticks out after @Onik suggestion

Update 2:
I deleted the item Viewand added this code to LinearLayoutand it will work!
android:divider="@drawable/divider"
android:showDividers="middle"
Note. android:dividerthe property is only available in Android3.0 (API level 11) or higher.
Actually this link helped me and showed me the correct way to put a separator: How to add a (vertical) divider to a horizontal LinearLayout?