How to put two buttons on same line in Android

前端 未结 7 1579
傲寒
傲寒 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:51

    Just make a linear layout.Set the orientation to horizontal and add two buttons.Its ready you will get what you want.Before posting such questions try googling you will get the answer for sure.This piece of code will help you.

    
    
        

    if you want to fit the two buttons in the layout.give the weight as 1 for both the buttons.

提交回复
热议问题