I have a single button in a linear layout. I want the button to take up half the width of its parent. Is there a way to do this in the layout xml.
Yep, the solution is very similar to that question, but you also want to set the weightSum of the parent LinearLayout: