当我尝试在 xml 中制作 android 表格布局时,eclipse 中出现警告此警告出现在布局部分的表格行:
This TableRow view is useless (no children, no background, no id)
<TableRow android:layout_width="fill_parent" android:layout_height="wrap_content">
</TableRow>
请告诉我如何克服这个警告。提前致谢。
最佳答案
当您只有一个“RowTable”部分时,就会出现这种情况。
尝试添加第二个空白部分,例如。
<TableRow android:id="@+id/tableRow2">
在我的例子中它有效。
关于安卓警告 "This TableRow view is useless (no children, no background, no id)",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8848428/