How to put two buttons on same line in Android

前端 未结 7 1584
傲寒
傲寒 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:55

    If you are placing the buttons inside the LinearLayout, give the Orientation value as "Vertical", it will automatically place the buttons in the same line. If you are using RelativeLayout, then for one button use android:layout_toLeftOf OR android:layout_toRightOf and give value as ID of other button. If you have got it right, please mark it as the answer. Thanks...

提交回复
热议问题