最后一行的两个按钮,我想让他们能打满这一行,就是一个按钮占两格,该怎么做呢,整个布局,我用的是Tablelayout
3条回答 默认 最新
关注
<TableLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <TableRow> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:text="第一个按钮"> </Button> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:text="第二个按钮"> </Button> </TableRow> </TableLayout>
效果如下:
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报