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.
You need to set a 0.5 (half) weight, and set the width to 0.