只需做一个线性的布局.将方向设置为水平,并添加两个按钮.它准备好你会得到你想要的.在发布这样的问题之前,尝试谷歌搜索,你会得到答案肯定.这段代码将帮助你.

android:layout_width="match_parent"

android:layout_height="wrap_content" >

android:id="@+id/button1"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="Button" />

android:id="@+id/button2"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="Button" />

如果您想要将layout.give中的两个按钮设为两个按钮的重量.

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐