Android的警告和QUOT;这样的TableRow观点是无用的(无儿无女,没有背景,没有ID)QUOT; [英] Android warning "This TableRow view is useless (no children, no background, no id)"

查看:399
本文介绍了Android的警告和QUOT;这样的TableRow观点是无用的(无儿无女,没有背景,没有ID)QUOT;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Eclipse中警告occours当我试图在XML中这个警告正值布局的部分表行的是Android表格布局:


  

本的TableRow观点是无用的(无子女,无背景,无ID)


 <的TableRow的android:layout_width =FILL_PARENT机器人:layout_height =WRAP_CONTENT>
< /&的TableRow GT;

普莱舍告诉我如何克服这个提前warning.Thanks。


解决方案

如果你知道你使用这个的TableRow (如添加的孩子后来在code)只是忽略警告。

UPD:你不能在code,而不分配给它的ID使用的TableRow 。为什么你需要在的TableRow

A warning occours in eclipse when I tried to make a android table layout in xml this warning comes at table row of the layout part:

This TableRow view is useless (no children, no background, no id)

<TableRow android:layout_width="fill_parent" android:layout_height="wrap_content">
</TableRow>

Plese tell me how to overcome this warning.Thanks in advance.

解决方案

If you know that you use this TableRow (e.g. you add children to it later in the code) just ignore the warning.

Upd: you can't use this TableRow in code without id assigned to it. Why do you need the TableRow?

这篇关于Android的警告和QUOT;这样的TableRow观点是无用的(无儿无女,没有背景,没有ID)QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆