Button half width of screen

后端 未结 4 1552
无人共我
无人共我 2020-12-14 14:31

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.



        
4条回答
  •  既然无缘
    2020-12-14 15:13

    None of these solutions worked for me on Android L. I had to do wrap_content as below:

提交回复
热议问题