Android LinearLayout with evenly space buttons

Step 1: Set the android:layout_width="0dp"
Step 2: Set the android:layout_weight equally among all button with sum equal to 1.0

Here is sample code
<LinearLayout android:id="@+id/linearLayout3"
 android:layout_height="wrap_content" android:orientation="horizontal"
 android:layout_width="match_parent">
 <Button android:text="Reset Form" android:layout_height="wrap_content"
  android:id="@+id/clear" android:layout_width="0dp"
  android:layout_weight=".5" />
 <Button android:text="Submit Form" android:layout_height="wrap_content"
  android:id="@+id/submit" android:layout_width="0dp"
  android:layout_weight=".5" />
</LinearLayout>

Android layout space buttons equally