This TableRow layout or its parent TableLayout may be useless

I have a warning in an XML file: this TableRow layout or its parent, TableLayout , is probably useless.

 <TableRow android:id="@+id/tableRow2"> ... </TableRow> 

I placed the android:id attribute there, but the warning did not disappear.

Any ideas on what might trigger the warning?

+4
source share
1 answer

Add

 tools:ignore="UselessParent" 

to the table row to avoid the warning or in the tag where you get the warning.

+4
source

All Articles