Write layout XML as following.
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="4">
<Button android:layout_width="0dip"
android:layout_height="wrap_content"
android:text="25%"
android:layout_weight="1"/>
<Button android:layout_width="0dip"
android:layout_height="wrap_content"
android:text="50%"
android:layout_weight="2"/>
<Button android:layout_width="0dip"
android:layout_height="wrap_content"
android:text="25%"
android:layout_weight="1"/>
</LinearLayout>
Linear layout should placed in a relative layout to make it to align parent bottom.
android:layout_alignParentBottom="true"
So your final layout will be similar to following
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<!-- Root element should wrap to parent size. -->
<!-- Your view xml codes. -->
<!--Bottom bar layout should be in root element. Parent should be Relative layout so that we can always align to parent bottom-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:weightSum="4">"
<Button android:layout_width="0dip"
android:layout_height="wrap_content"
android:text="25%"
android:layout_weight="1"/>
<Button android:layout_width="0dip"
android:layout_height="wrap_content"
android:text="50%"
android:layout_weight="2"/>
<Button android:layout_width="0dip"
android:layout_height="wrap_content"
android:text="25%"
android:layout_weight="1"/>
</LinearLayout>
</RelativeLayout>
Hope this fix your issue.