我如何可以将两个按钮放在同一行中我的登录布局在我的Android应用程序?
How can I place two buttons on the same line in my login layout on my Android application?
只是做一个线性layout.Set方向水平和增加两个buttons.Its准备,你会得到你want.Before张贴这样的问题,请尝试使用Google,你会获得sure.This一张code的回答将帮助你。
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.
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button" />
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button" />
</LinearLayout>
如果要配合在layout.give两个按钮的重量为1,这两个按钮。
if you want to fit the two buttons in the layout.give the weight as 1 for both the buttons.