How to add 2 buttons horizontally with a width of 50% for each?
LinearLayout
android:layout_width="0px"
android:layout_weight="1"
Add both buttons to linearlayout and specify the orientation as horizontal. And specify the width as zero dp for both buttons, and layout_weight = 1 for each. He will work.