android: relative layout two buttons occupy all the available horizontal space

前端 未结 6 1175
不知归路
不知归路 2021-02-13 11:06

i have a relative layout and i have two buttons in it with texts \"hello\" and \"world\" respectively. i want these two buttons to lie adjacent to each other and equally occupy

6条回答
  •  生来不讨喜
    2021-02-13 11:48

    I know that is a old request, but maybe it's can be useful for somebody.

    In your case the right solution is using Linear Layout. But for reply your request and suppose that you have an other widget in your layout:

    
    
     
    
     
    
        

提交回复
热议问题