【发布时间】:2012-01-13 21:00:09
【问题描述】:
我正在尝试使用我的布局文件放置文本视图和按钮行。它应该看起来像这样:
Row 1: [ TextView ( ~2/3 of the screen ) ] [ Button (~1/3 of the screen) ]
Row 2: [ TextView ( ~2/3 of the screen ) ] [ Button (~1/3 of the screen) ]
Row 3: [ TextView ( ~2/3 of the screen ) ] [ Button (~1/3 of the screen) ]
Row 4: [ TextView ( ~2/3 of the screen ) ] [ Button (~1/3 of the screen) ]
Row 5: [ TextView ( ~2/3 of the screen ) ] [ Button (~1/3 of the screen) ]
.....
我对如何做到这一点感到困惑。我可以使用 TableLayout 或 RelativeLayouts 吗?有人可以给我看一些示例代码,因为我不知道如何使用 XML。非常感谢您的帮助!
【问题讨论】:
标签: java android xml layout widget