How to put two buttons on same line in Android

前端 未结 7 1638
傲寒
傲寒 2021-01-01 22:17

How can I place two buttons on the same line in my login layout on my Android application?

7条回答
  •  星月不相逢
    2021-01-01 22:47

    The best solution is to place 2 buttons (Having equal width) in LinearLayout.

    One more thing, If you want equal "width" buttons then take button with 0dp width and same weights to all the buttons.

    And if you want equal "hight" buttons then take button with 0dp height and same weights to all the buttons.

    
    
        

提交回复
热议问题